You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "justinpark (via GitHub)" <gi...@apache.org> on 2023/10/05 15:55:23 UTC

[PR] fix(menu): Active menu style during SPA navigation [superset]

justinpark opened a new pull request, #25533:
URL: https://github.com/apache/superset/pull/25533

   ### SUMMARY
   Fixes the addressed issue (no. 2) on https://github.com/apache/superset/pull/25151#issuecomment-1747279563
   
   This commit replaces Link with NavLink to fix outdated highlighted menu. This commit replaces the ant-menu-item-selected style by NavLink active style to sync the router active link status.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before:
   
   https://github.com/apache/superset/assets/1392866/5a4e20a0-e393-4d63-98ad-7789a44a4cce
   
   After:
   
   https://github.com/apache/superset/assets/1392866/23cdd7ea-aed0-44fa-94d2-33dc08c0a03f
   
   
   ### TESTING INSTRUCTIONS
   Click Chart (or Dashboard) link
   Click Query History menu under the SQL Link
   Navigate back by the browser button
   See the highlighted menu on the header
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(menu): Styling active menu in SPA navigation [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on code in PR #25533:
URL: https://github.com/apache/superset/pull/25533#discussion_r1394667228


##########
superset-frontend/src/features/home/Menu.tsx:
##########
@@ -154,6 +154,29 @@ const globalStyles = (theme: SupersetTheme) => css`
       margin-left: ${theme.gridUnit * 1.75}px;
     }
   }
+  .ant-menu-item-selected {
+    background-color: transparent !important;

Review Comment:
   Is it possible to avoid `!important` here? Maybe using a more specific class?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(menu): Styling active menu in SPA navigation [superset]

Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark commented on code in PR #25533:
URL: https://github.com/apache/superset/pull/25533#discussion_r1414258486


##########
superset-frontend/src/features/home/Menu.tsx:
##########
@@ -154,6 +154,29 @@ const globalStyles = (theme: SupersetTheme) => css`
       margin-left: ${theme.gridUnit * 1.75}px;
     }
   }
+  .ant-menu-item-selected {
+    background-color: transparent !important;

Review Comment:
   @michael-s-molina I just removed all these redundant `!important`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(menu): Styling active menu in SPA navigation [superset]

Posted by "EugeneTorap (via GitHub)" <gi...@apache.org>.
EugeneTorap commented on PR #25533:
URL: https://github.com/apache/superset/pull/25533#issuecomment-1789390921

   Hi @michael-s-molina @rusackas! Can we merge it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(menu): Styling active menu in SPA navigation [superset]

Posted by "EugeneTorap (via GitHub)" <gi...@apache.org>.
EugeneTorap commented on PR #25533:
URL: https://github.com/apache/superset/pull/25533#issuecomment-1792968277

   Hi @michael-s-molina @john-bodley @craig-rueda! Can you approve this PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(menu): Styling active menu in SPA navigation [superset]

Posted by "justinpark (via GitHub)" <gi...@apache.org>.
justinpark merged PR #25533:
URL: https://github.com/apache/superset/pull/25533


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org