Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Updates functioning of catalog home button #394

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

jsheunis
Copy link
Member

This adds improved logic to the function called when user selects the home button: (this applies when the current location is any tab on any dataset page in a catalog)

  • If there is NO home page set:
    • if there is a tab name in the URL, navigate to current
    • else: don't navigate, only reset
  • If there IS a home page set:
    • if the current page IS the home page:
      • if there is a tab name in the URL, navigate to current
      • else: don't navigate, only reset
    • if the current page is NOT the home page, navigate to home (reset = clear filters and set tab index = 0)

Closes #390

This adds improved logic to the function called when user selects the home button:
(this applies when the current location is any tab on any dataset page in a catalog)
- If there is NO home page set:
  - if there is a tab name in the URL, navigate to current
  - else: don't navigate, only reset
- If there IS a home page set:
  - if the current page IS the home page:
    - if there is a tab name in the URL, navigate to current
    - else: don't navigate, only reset
  - if the current page is NOT the home page, navigate to home
(reset = clear filters and set tab index = 0)
@jsheunis
Copy link
Member Author

damn, now what's up with metalad on windows :( https://ci.appveyor.com/project/mih/datalad-catalog/builds/48265221/job/osu78mqs5at52nou

@jsheunis
Copy link
Member Author

Since the appveyor failure issue is tracked separately in metalad, and it is not influenced by or a prerequisite for code, this PR can be merged

@christian-monch
Copy link
Contributor

damn, now what's up with metalad on windows :( https://ci.appveyor.com/project/mih/datalad-catalog/builds/48265221/job/osu78mqs5at52nou

This should be fixed by release 0.14.20 of datalad-metalad.

@jsheunis
Copy link
Member Author

Thanks @christian-monch !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Home button should reset page
2 participants