Add/edit tags to track decomissioned components and add protection type subcomponents to Access Control components#1588
Conversation
✅ Deploy Preview for atd-moped-main ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| INSERT INTO moped_component_tags (name, type, slug) VALUES | ||
| ('', 'Decommissioned / Upgraded Component', 'decommissioned_upgraded_component'); | ||
|
|
||
| -- Update existing component tag name to include 'component' in name |
There was a problem hiding this comment.
maybe? it isn't a great comment so I updated. thanks! Also, I noticed that my editor didn't use SQLFluff on this file successfully so that is fixed now too.
chiaberry
left a comment
There was a problem hiding this comment.
Test steps check out, and I was able to add components to the map with the new tags and subcomponents
| inserts_todo.component_id, | ||
| inserts_todo.subcomponent_id | ||
| FROM | ||
| inserts_todo; |
There was a problem hiding this comment.
Looks good. I noticed we don't have a unique constraint on (component_id, subcomponent_id) on this table—what do you think about adding one?
There was a problem hiding this comment.
great catch - thanks John! I will add in this PR. 🙏
| @@ -0,0 +1,44 @@ | |||
| -- Insert new tag to mark decommissioned components | |||
| INSERT INTO moped_component_tags (name, type, slug) VALUES | |||
| ('', 'Decommissioned / Upgraded Component', 'decommissioned_upgraded_component'); | |||
There was a problem hiding this comment.
I know this is an existing pattern for this table, but inserting an empty string feels very icky. If null values are acceptable, can we relax the not null constraint?
There was a problem hiding this comment.
this does indeed feel blah - thanks for spotting this! I will update this and some of the existing tags with empty strings while I'm at it (and makes sure they render as expected). 🧹✨🙏
There was a problem hiding this comment.
I ran into a snag here so I created cityofaustin/atd-data-tech#22462 to address and fix a bug in the AGOL view where null names cause the tags to not list at all and empty strings are causing unwanted dashes. We'll get there!
There was a problem hiding this comment.
Complications! Thanks for following-up on that 👍
Associated issues
Closes cityofaustin/atd-data-tech#22248, Closes cityofaustin/atd-data-tech#22232
This PR makes changes to component tags to make it easier to mark and filter out decommissioned components and also to be able to add protection type subcomponents like flex posts to some of the Access Control component types.
Testing
URL to test:
Local 🙏
Steps to test:
Ship list
[ ] Product manager added to QA test script if applicable