Skip to content

Commit

Permalink
Amends ADR for SSA Ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
cynthia-anya committed Nov 7, 2023
1 parent 85ecc9f commit ff1db7f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ Accepted
## Context
There was some work to make the Mainstream publisher user interface more user friendly around 2015 by introducing an asynchronous post back mechanism that posted current edit state to the server without posting the page and requiring a page refresh.

This commit comment explains that at the time, Simple Smart Answers was excluded from the work
This commit comment explains that at the time, Simple Smart Answers (SSA) was excluded from the work
https://github.com/alphagov/publisher/pull/358/commits/74e4d135d9619cf799935b8ca2ea45cffc62f2d3

> **Don't save simple smart answers using ajax**. Javascript form construction is too complex to handle validation
without a full page reload, at least for now.

This has been revisted recently as users have requested the asynchronous postback feature to be added to Simple Smart Answers.
This has been revisited recently as users have requested the asynchronous postback feature to be added to Simple Smart Answers.

Similar to Guides (which are made up of smaller components called Parts), SSA also need a separate module that handles its own smaller components (Nodes) more gracefully. This will allow us to use Snackbars with SSA and validations will be handled correctly in all parts of the SSA form, following the convention the module could be called ajax_save_with_nodes.js
Similar to Guides (which are made up of smaller components called Parts), SSA also need a separate module that handles its own smaller components (Nodes) more gracefully. This will allow us to use Snackbars with SSA and validations will be handled correctly in all parts of the SSA form, following current convention the module could be called ajax_save_with_nodes.js

It was decided that the effort to create a well tested ajax_save_with_nodes.js module for SSA, would not be worth the benefit to the end user. This decision is also favourable due to the possibility that we may be moving Publisher over to the GDS Design System, where Javascript is not permitted, meaning features such as snackbars may end up being removed.
It was decided that the effort to create a well tested ajax_save_with_nodes.js module for SSA, is not something we have capacity for within the team at this time. Although there is benefit for the users to have features such as Snackbars, there is a possibility that we may be moving Publisher over to the GDS Design System, where Javascript is not permitted, meaning Snackbars may end up being removed from publisher entirely, making the effort redundant.

## Decision
We will not implement asynchronous javascript saves for the simple smart answers content type in publisher
Expand Down

0 comments on commit ff1db7f

Please sign in to comment.