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

[#133] reflect tabs in url #135

Merged
merged 7 commits into from
Feb 25, 2024
Merged

Conversation

goblinodds
Copy link
Contributor

within an individual project, the URL now upates according to which tab/s you've selected, you can navigate back and forth in the browser to move between tabs, and you can navigate to a project with specific tabs selected using the relevant URL

previously it defaulted to "topContributors" whether or not any contributions had been made

if you navigate to a project from the site everything works as intended, but if you paste the url to a project you own into the browser it defaults to the "register a donation" rather the "incoming donations" tab (previously it was defaulting to the "top contributors" tab)
workflow run keeps failing; seems like it may be bc the prettier versions weren't the same
ok this should work, finally :')
project tabs now appear in URL when clicked (but using that URL doesn't yet set the page to the correct tabs)

QUESTION
Should value be set to a more specific type here?:

const handleTabChange = (type: 'tab' | 'comments', value: string | null)
url generated by changing tabs can now be pasted into the browser and will maintain the relevant tabs
@goblinodds goblinodds linked an issue Jan 31, 2024 that may be closed by this pull request
string | null
>(null)

// QUESTION: should value be set to a more specific type?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, but it also works like this. 😊 I imagine the next step could be to move this logic into a wrapper around the taps component so that it becomes available on all pages that use tabs, but that can wait until we have more usage on the platform and people use the feature. I'll find it very convenient to be able to just link people to their preferences tab when they ask where they can adjust their preferences! 😃

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh ok yeah! maybe this would be good for me to do before setting this up for the project page filters

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially! But let's hold off on it until we have more of a direction again. Matt wants to do some interviews to see what else we can help with, so I'm not currently confident enough that it'll be worth your while.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

roger that!!

@Telofy
Copy link
Contributor

Telofy commented Feb 25, 2024

Great work! And sorry that took me so long to review. (Remember to enter your hours on Deel. :-3)

@Telofy Telofy merged commit ab25c76 into development Feb 25, 2024
2 checks passed
@Telofy Telofy deleted the 133-reflect-tabs-and-filters-in-url branch February 25, 2024 13:05
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.

Reflect tabs in URL
2 participants