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

dev: improve state handling for setting screens #151

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

justlevine
Copy link
Member

What

This PR improves the way setting screens are saved locally and on the server.

Additionally, NPM deps have been bumped to their latest (semver-compatible) versions.

It does not affect the Providers screen.

Why

Follow up to #144

How

  • The context now tracks a local/server state.
  • When the state is clean, the save button is disabled.
  • When the state is dirty, an indicator is shown next to the screen title and a prompt is shown to save the settings when attempting to navigate away.

Testing Instructions

Additional Info

The providers screen will be handled when the providers themselves get refactored.

Checklist:

  • My code is tested to the best of my abilities.
  • My code follows the WordPress Coding Standards.
  • My code has proper inline documentation.
  • I have added unit tests to verify the code works as intended.
  • I included the relevant changes in CHANGELOG.md

@justlevine justlevine merged commit f447fb6 into AxeWP:develop Dec 21, 2024
3 of 4 checks passed
@justlevine justlevine deleted the fix/save-settings branch December 21, 2024 16:51
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.

1 participant