Skip to content

Removing autosave functionality (not in use) #1227

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

Merged
merged 4 commits into from
Jun 7, 2023

Conversation

olemartinorg
Copy link
Contributor

@olemartinorg olemartinorg commented Jun 5, 2023

Description

Removing the autoSave toggle. My reasons for this is:

  • You have to know what you're doing to toggle it off, because it isn't documented anywhere (you had to read our code to find it).
  • Nobody is using this setting, as far as I can tell (and I've downloaded every app currently in production and every app I could get a hold of that's on tt02).
  • Server-side calculations stop being responsive if you toggle it off.
  • There's been a notice in our code for a while asking if that setting is used at all, and everyone had to code around it hoping other changes to form saving didn't break this unknown feature.
  • If you try to enable it, you might find that we only respect the setting from the last layout file we processed, so it would've been best to set it on every single layout file if you really wanted it. Or just never change the page order.
  • We have no tests for it, so nobody knows if it works in conjunction with other features (such as triggers for components, seem to just not be working at all).
  • Nobody seem to have requested it (it was implemented in Feature/4778 multiple form pages app altinn-studio#4953, which links to two issues that never describes anything about enabling/disabling auto-saving). Either that, or this is leftovers from the past, if no autosaving used to be the default until this was introduced.
  • I don't want to support it in Experiment: Storing the data model in a Context #1175.

A recording of it action, for posterity. Notice how server-side calculations are not updated until you manually trigger a save.

recording-no-autosave.mp4

Related Issue(s)

Verification/QA

  • Manual functionality testing
    • I have tested these changes manually
    • Creator of the original issue (or service owner) has been contacted for manual testing (or will be contacted when released in alpha)
    • No testing done/necessary
  • Automated tests
    • Unit test(s) have been added/updated
    • Cypress E2E test(s) have been added/updated
    • No automatic tests are needed here (no functional changes/additions)
    • I want someone to help me make some tests
  • UU/WCAG (follow these guidelines until we have our own)
    • I have tested with a screen reader/keyboard navigation/automated wcag validator
    • No testing done/necessary (no DOM/visual changes)
    • I want someone to help me perform accessibility testing
  • User documentation @ altinn-studio-docs
  • Changes/additions to component properties
    • Changes are reflected in both src/layout/layout.d.ts and layout.schema.v1.json, and these are all backwards-compatible
    • No changes made
  • Support in Altinn Studio
    • Issue(s) created for support in Studio
    • This change/feature does not require any changes to Altinn Studio
  • Sprint board
    • The original issue (or this PR itself) has been added to the Team Apps project and to the current sprint board
    • I don't have permissions to do that, please help me out
  • Labels
    • I have added a kind/* label to this PR for proper release notes grouping
    • I don't have permissions to add labels, please help me out

Ole Martin Handeland added 4 commits June 2, 2023 16:11
… (not proceed to the next step), a couple of arguments to FormDataActions.submit() are now only set once, so we can make them constants. Making them constants mean we can clean up the dead code that checks it.
@olemartinorg olemartinorg added the kind/other Pull requests containing chores/repo structure/other changes label Jun 5, 2023
@olemartinorg olemartinorg self-assigned this Jun 5, 2023
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 5, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

37.5% 37.5% Coverage
0.0% 0.0% Duplication

Copy link
Member

@bjosttveit bjosttveit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enig, få det bort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/other Pull requests containing chores/repo structure/other changes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants