-
Notifications
You must be signed in to change notification settings - Fork 0
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
layouts as objects #331
Merged
dblatcher
merged 3 commits into
dblatcher/store-layouts-in-s3
from
dblatcher/layouts-as-objects
Jan 3, 2025
Merged
layouts as objects #331
dblatcher
merged 3 commits into
dblatcher/store-layouts-in-s3
from
dblatcher/layouts-as-objects
Jan 3, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KaliedaRik
approved these changes
Jan 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes make sense. Happy to approve
dblatcher
added a commit
that referenced
this pull request
Jan 8, 2025
* define abstract and inMem class * add get routes to api * basic views on the UI * load newsletters with the layouts * display component * add USE_IN_MEMORY_LAYOUT_STORAGE setting * add a local option to disable the new UI route * make the layout index page useful * correct zod typing and support array data * add post route for layouts * can create new layouts from the map page * layout page has json editor for layouts * use a fixture json file for the initial local test data * move components to subfolder, make the cards nicer * move display logic out of the View component * address possible falsy editionId * don't show the edit options to people without permisson * add new permissions for edit layouts * add layout routes to UI server * sketch out the class defn * use the s3 storage based on settings * read and create work * updating works * add delete method * fix format for put object commands * add new routes to cache control * lint - import style * do not need a separate setting for layout storage * correct setting name, remove route conditional * correct variabel name, add TO DO for future PR * add parsing * layouts as objects (#331) * nest the groups in an object * lint * correct create api call
dblatcher
added a commit
that referenced
this pull request
Feb 4, 2025
* define abstract and inMem class * add get routes to api * basic views on the UI * load newsletters with the layouts * display component * add USE_IN_MEMORY_LAYOUT_STORAGE setting * add a local option to disable the new UI route * make the layout index page useful * correct zod typing and support array data * add post route for layouts * can create new layouts from the map page * layout page has json editor for layouts * use a fixture json file for the initial local test data * move components to subfolder, make the cards nicer * move display logic out of the View component * address possible falsy editionId * don't show the edit options to people without permisson * add new permissions for edit layouts * add layout routes to UI server * sketch out the class defn * use the s3 storage based on settings * read and create work * updating works * add delete method * fix format for put object commands * add new routes to cache control * lint - import style * do not need a separate setting for layout storage * correct setting name, remove route conditional * correct variabel name, add TO DO for future PR * add parsing * layouts as objects (#331) * nest the groups in an object * lint * correct create api call * move edit json to another page * add third route for the new editor, consolidate the MissingLayoutContent * add basic editor that cannot add or remove groups yet * tighten layout * can add and remove groups * make lib file for modify functions * make look nicer * nice searchable picker list * Group Control component * trivial linting * handle loading/error states better * undo config change * picker use 1/4 of the container width * picker use 1/4 of the container width - 2 * Apply suggestions from code review Co-authored-by: Emily Bourke <[email protected]> * disable use of @emotion/styled * use the mui css import instead of emtion/styled --------- Co-authored-by: Emily Bourke <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this change?
updates #328
Changes the API format for layouts to be an object with an array of groups, rather than an array of groups.
This is to make the model easier to expand with extra data/config for the layout other than the groups of newsletters it contains.
It will also make the json data easier to handle in scala applications (EG frontend) which can more easily model the layout as (for example) a
NewsletterLayout
rather than aList[NewsletterGroup]
.How to test
Should work as before locally.
If deployed to CODE, the existing layout data will be invalidated and may need to be manually deleted from S3
How can we measure success?
new model from the api responses
Have we considered potential risks?
#328 has not been put live yet, so there is no layout data in the PROD bucket to get invalidated by this change