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

[PR] fix(header navlinks): link navlinks to path prefix [superset]

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   The navlinks were previously highlighted using click events, which meant that if a user was pushed to another portion of the site, the navlinks wouldn't highlight the correct tab that the user was located under. The proposed fix introduces logic to set the highlighted navlink based upon the url prefix rather than click events alone.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   Before: 
   https://www.loom.com/share/67f59bc0320043dcbcdc6e2715b7da44?sid=c1821e43-cfc4-43f1-a8d6-cb87674da138
   
   After:
   https://www.loom.com/share/37b1679dce32469986ae743e318c132c?sid=c97fe956-581a-4adc-a551-204794c1f586
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] 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(header navlinks): link navlinks to path prefix [superset]

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


##########
superset-frontend/src/features/home/Menu.tsx:
##########
@@ -186,6 +186,31 @@ export function Menu({
     return () => window.removeEventListener('resize', windowResize);
   }, []);
 
+  enum paths {
+    EXPLORE = '/explore',
+    DASHBOARD = '/dashboard',
+    CHART = '/chart',
+    DATASETS = '/tablemodelview',
+  }
+  const [activeTabs, setActiveTabs] = useState(['']);

Review Comment:
   Is there a benefit to defaulting to an array with one empty string rather than an empty array?



-- 
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(header navlinks): link navlinks to path prefix [superset]

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

   @fisjac can you remove the package-lock.json file?


-- 
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(header navlinks): link navlinks to path prefix [superset]

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


-- 
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