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

Save Bounty State When Browsing #950

Merged

Conversation

MahtabBukhari
Copy link
Contributor

@MahtabBukhari MahtabBukhari commented Jan 18, 2025

Describe your changes

Issue ticket number and link: https://community.sphinx.chat/bounty/3394

Evidence: https://www.loom.com/share/b6407f23279840f79d7f2904ae74ea0e?sid=98f18fd2-dfff-4880-b358-5271119e9ad1

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested on Chrome and Firefox
  • I have tested on a mobile device
  • I have provided a screenshot or recording of changes in my PR if there were updates to the frontend

@MahtabBukhari MahtabBukhari changed the title Retain Loaded State and Scroll Position for Bounties and Workspace Pages Save Bounty State When Browsing Jan 18, 2025
@MahtabBukhari
Copy link
Contributor Author

@humansinstitute Could you please review the PR?

Issue: On Workspace Bounties, opening a bounty modal changes the URL to /bounty/:bountyId. Closing the modal redirects back to /workspace/bounties/:bountyId, causing the component to reload, resetting the bounties to the initial 25 items.

@MahtabBukhari
Copy link
Contributor Author

MahtabBukhari commented Jan 19, 2025

@humansinstitute Could you please review the PR?

Issue: On Workspace Bounties, opening a bounty modal changes the URL to /bounty/:bountyId. Closing the modal redirects back to /workspace/bounties/:bountyId, causing the component to reload, resetting the bounties to the initial 25 items.

@humansinstitute I have spent many hours on this and try different methods but not succeed yet because of path difference
But i have solved the issue that is when we click on load more button then the previous bounties remains visible and load more functionality working well and smoothly now

@jordan-ae
Copy link
Contributor

No offence @MahtabBukhari your loom doesn't show the issue being fixed. You don't click on any card in workspace bounties throughout the video to demonstrate the fix as working. You should probably make a new video demonstrating you click on one closing the card and the state being preserved

@MahtabBukhari
Copy link
Contributor Author

@humansinstitute Could you please review the PR?

Issue: On Workspace Bounties, opening a bounty modal changes the URL to /bounty/:bountyId. Closing the modal redirects back to /workspace/bounties/:bountyId, causing the component to reload, resetting the bounties to the initial 25 items.

@humansinstitute I have spent many hours on this and try different methods but not succeed yet because of path difference
But i have solved the issue that is when we click on load more button then the previous bounties remains visible and load more functionality working well and smoothly now

@jordan-ae Have you read this one?

@jordan-ae
Copy link
Contributor

jordan-ae commented Jan 19, 2025

Oh sorry didn't read see that my bad. You couldn't find a fix because this isn't a bug (as I expressed in a PR I've now closed) it's a design flaw mostly stemming from the fact that this component wasn't built with reuse ability in mind. @MahtabBukhari @humansinstitute I think we should consider it a refactor of the component rather than a bug because there's no bug it's just the intended behaviour of the component. What do you guys think?

@MahtabBukhari
Copy link
Contributor Author

MahtabBukhari commented Jan 19, 2025

Oh sorry didn't read see that my bad. You couldn't find a fix because this isn't a bug (as I expressed in a PR I've now closed) it's a design flaw mostly stemming from the fact that this component wasn't built with reuse ability in mind. @MahtabBukhari @humansinstitute I think we should consider it a refactor of the component rather than a bug because there's no bug it's just the intended behaviour of the component. What do you guys think?

@jordan-ae yeah you are right
@humansinstitute we should be adopt an approach like component should be same and path as well such like bounties page

@MahtabBukhari
Copy link
Contributor Author

@humansinstitute you can merge this one PR

it has resolved the issue of when we click on load more button then the new bounties loaded and previously disappeared

@humansinstitute humansinstitute merged commit acf23eb into stakwork:master Jan 20, 2025
64 checks passed
@humansinstitute
Copy link
Collaborator

i think the approach outlined here is probably correct with refactoring the component.

@humansinstitute
Copy link
Collaborator

Link to: #959

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.

3 participants