kobotoolbox / kpi

kpi is the server for KoboToolbox. It includes an API for users to access data and manage their forms, question library, sharing settings, create reports, and export data.
https://www.kobotoolbox.org
GNU Affero General Public License v3.0
133 stars 181 forks source link

Clicking X button when viewing Single Project should go back to previous view #4234

Closed magicznyleszek closed 2 months ago

magicznyleszek commented 1 year ago

Let's address this:

When I click the x button to close a project it returns to My Projects rather than going back to the project view I was in. My expectation would be to go back to the project view with the same filters/sorting applied.

All the filters and sorting are being remembered on the endpoint, so a simple const navigate = useNavigate(); navigate(-1); should get us almost everything w need.

The optional improvement here would be to ensure that the project we are going back from is being displayed in the table. So if user was scrolling down on the table and loaded further pages, going back would also load these pages and scroll down the project row into view (like Element.scrollIntoView())

jamesrkiger commented 2 months ago

Fixed in #4450