-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add new transition form #1384
Add new transition form #1384
Commits on Sep 8, 2023
-
Add constants for global and special redirect types
We want to add a new site form. In order to do this we will need an easy way to access these values. We might want to consider refining these further into enums, as this would allow us to remove some of the methods in the site model.
Configuration menu - View commit details
-
Copy full SHA for 2376ba3 - Browse repository at this point
Copy the full SHA 2376ba3View commit details -
We want to add sites per organisation. This add nested routes for site creation.
Configuration menu - View commit details
-
Copy full SHA for 98a59f2 - Browse repository at this point
Copy the full SHA 98a59f2View commit details -
Only validate presence of canonical host or aka if hostname is present
If hostname is not provided for the host, this validation will raise an error. Add a condition that this validation only runs when hostname is present.
Configuration menu - View commit details
-
Copy full SHA for 0250f54 - Browse repository at this point
Copy the full SHA 0250f54View commit details -
We are aiming to archive Transition Config which is currently used to create sites in Transition. This adds a form object for the creation of a site. It's worth noting that the process currently moves existing hosts and aka hosts to the new site if they already exist (see `lib/transition/import/site_yaml_file.rb`). We aren't yet sure whether we want to create a new UI for that functionality, or to use this form. For now, this form does not have that functionality.
Configuration menu - View commit details
-
Copy full SHA for da2db05 - Browse repository at this point
Copy the full SHA da2db05View commit details -
Add site creation actions and views
We are aiming to archive Transition Config which is currently used to create sites in Transition. This adds the actions and views necessary for a user to add a new transition.
Configuration menu - View commit details
-
Copy full SHA for 6e38101 - Browse repository at this point
Copy the full SHA 6e38101View commit details -
Validate that host hostname is lowercase
Currently the site importer (`lib/transition/import/site_yaml_file.rb`) downcases any hostnames. This adds validation to the host model which will be surfaced on the new site form.
Configuration menu - View commit details
-
Copy full SHA for e249f33 - Browse repository at this point
Copy the full SHA e249f33View commit details -
Only allow
Site managers
to create new sitesThis adds authorization that only people with the `Site manager` role in GOV.UK Signon can create new sites. This is so that we can safely test new features before we officially archive Transition Config.
Configuration menu - View commit details
-
Copy full SHA for cb051c7 - Browse repository at this point
Copy the full SHA cb051c7View commit details -
Validate that global new URL is absent if the global type is "archive"
Currently, there is validation in place to prevent the creation of sites which have a global type of "redirect" without a global new URL, but the opposite validation is missing.
Configuration menu - View commit details
-
Copy full SHA for 7e1e35e - Browse repository at this point
Copy the full SHA 7e1e35eView commit details -
Improve appearance of radio buttons
In order to style these using Bootstrap, we need to provide a block to `collection_radio_buttons`.
Configuration menu - View commit details
-
Copy full SHA for ab5026c - Browse repository at this point
Copy the full SHA ab5026cView commit details -
Nilify blanks on the Site model
The optional fields of the site form come through as empty strings when left blank. These are then saved in the database, when ideally these would be saved as `nil` in order to preserve the previous behaviour of adding them through Transition Config for consistency. We already have a module that handles the nilification of blanks, however we need to make a couple of changes: - We add an "except list" of attributes that we don't want to nilify, such as Booleans that should be false and not nil (false.blank? == true). - We allow blank for `special_redirect_strategy` as this will now be nilified before save.
Configuration menu - View commit details
-
Copy full SHA for e68936d - Browse repository at this point
Copy the full SHA e68936dView commit details -
Add hints to new site form inputs
This copies the guidance fro Transition Config over to the new site form. This will need later refinement.
Configuration menu - View commit details
-
Copy full SHA for 1f8f4ef - Browse repository at this point
Copy the full SHA 1f8f4efView commit details