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

[FE](fix): remove automatic back action when saved PAs and show save btn only when necessary [MRXN23-547] #1614

Merged
merged 3 commits into from
Dec 22, 2023

Conversation

anamontiaga
Copy link
Collaborator

@anamontiaga anamontiaga commented Dec 15, 2023

Remove automatic back action when saved PAs and show save button only when necessary

Overview

After clicking save in some cases you go back to the previous tab (Protected areas) or you stay in the same (features).
We should make this consistent.

This PR is a solution, removing the goBack action when saving threshold and disable mutation when threshold has been not changed, as protected areas are already saved in previous step.
Also, selected features mutation is disable when there is no changes.

In both cases an info toast has been added:
Screenshot 2023-12-18 at 19 26 00

Here is some extra info about why we are not disabling button and we are just disabling mutations:
https://axesslab.com/disabled-buttons-suck

Feature relevant tickets

MRXN23-547

Copy link

vercel bot commented Dec 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marxan ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2023 6:29pm

@anamontiaga anamontiaga requested a review from agnlez December 15, 2023 12:37
@anamontiaga anamontiaga changed the title [FE](fix): remove automatic back action when saved PAs and show save btn only when necessary [FE](fix): remove automatic back action when saved PAs and show save btn only when necessary [MRXN23-547] Dec 15, 2023
@anamontiaga anamontiaga requested review from mbarrenechea and removed request for agnlez and mbarrenechea December 15, 2023 13:10
@anamontiaga anamontiaga marked this pull request as draft December 15, 2023 13:38
@anamontiaga anamontiaga marked this pull request as ready for review December 18, 2023 14:45
@anamontiaga anamontiaga added the Frontend Everything related frontend label Dec 18, 2023
@anamontiaga anamontiaga merged commit 9a7e185 into develop Dec 22, 2023
13 checks passed
@anamontiaga anamontiaga deleted the MRXN23-547-back-after-saving branch December 22, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frontend Everything related frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant