0x213F / jukebox-radio-django

Part Jukebox. Part Radio.
Other
1 stars 0 forks source link

Refactor TextCommentModificationCreateView to "create or update" #57

Closed 0x213F closed 3 years ago

0x213F commented 3 years ago

Let's say someone makes the interval from 0 -> 5 bold. What if they then create an interval from 5 -> 9 bold? Or 4 -> 8? This should extend (update) the original entry.

This should be implemented by adding a "protect_create" DB trigger. There should be an official interface for creating a TCM which either creates or updates, depending on whatever is already in the DB.

The API structure (and front-end) should be updated to accommodate this as well. If updating, the response needs to be updated in the Redux model. If adding, the TCM should be added to the Redux model.

Also, the styling of TCM should be updated to accomodate overlapping styles. We are going to have to get crafty to get overlapping styles implemented in the front-end (which should also be another ticket.)

0x213F commented 3 years ago

that was fun