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

fix/set saved simplification #196

Merged
merged 7 commits into from
Oct 4, 2024
Merged

Conversation

joshua-dean
Copy link
Collaborator

Simplification of set_saved for submit buttons

Description

Closes #119. Between this and event listeners being in the .ulabel group, implementers of the tool should have full control over the reload prompt.

I left set_saved as optional in the type, as the SubmitButtons toolbox item will set the default regardless.

tl;dr is set_saved on submit buttons now defaults to "false". If set to "true", it will call ULabel.set_saved, skipping the reload/nav prompt.

PR Checklist

  • Merged latest main
  • Version number in package.json has been bumped since last release
  • Version numbers match between package package.json and src/version.js
  • Ran npm install and npm run build AFTER bumping the version number
  • Updated documentation if necessary (currently just in api_spec.md)
  • Added changes to changelog.md

Breaking API Changes

Technically the ability to make a submit button invalidate existing changes and force the reload prompt is gone.
If anyone was leveraging this functionality, let me know and I'll personally implement a feature to invalidate the save state on submit.

@joshua-dean joshua-dean added the enhancement New feature or request label Oct 4, 2024
@joshua-dean joshua-dean self-assigned this Oct 4, 2024
index.d.ts Outdated Show resolved Hide resolved
Co-authored-by: Trevor Burgoyne <82477095+TrevorBurgoyne@users.noreply.github.com>
@joshua-dean joshua-dean merged commit 4baa9ad into main Oct 4, 2024
@joshua-dean joshua-dean deleted the fix/set-saved-simplification branch October 4, 2024 20:06
@joshua-dean joshua-dean mentioned this pull request Oct 7, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuration Option for Reload Prompt
2 participants