getopenwater / cmsresearch

MIT License
0 stars 0 forks source link

Theme Switcher #5

Closed bootleg224 closed 2 months ago

apexdodge commented 4 months ago

Theme Switcher Review

1) When you create a new theme and click Save, it crashes

https://s3.amazonaws.com/vo-random/ShareX/2024/07/chrome_LQCwRJ76i6.png

https://s3.amazonaws.com/vo-random/ShareX/2024/07/devenv_LXQQE61aSk.png

2) When you Search for a theme, it should retain the search query in the box. It clears after you click Search.

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_ST8K4O1ZPs.png

3) Let’s scrap the whole concept of having a thumbnail image.

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_BDNigWd2Xc.png https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_mkKGsF9Hpo.png

Let’s keep the UI pattern of the table here, like Email Templates.

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_uzgbQevZUU.png

4) We do not need the concept of “Revisions” at the Theme level, just the template level.

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_qLB2Uj0DWq.png

5) Set current version to 1.3.0 instead of 1.4.0

6) Why am I able to upload a file in the Thumbnail Preview area https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_V5lb4pSGO6.png

But when I try to upload a file in the Web Template, it fails

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_h3H9Qv3I1A.png

7) Additionally, the file uploader does not seem to refresh itself / get a new instance of itself. In the screenshot below, it is still showing an old upload I did earlier after navigating to new pages, coming back, refreshing my page, etc.

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_wBrI2MbCqP.png and then if you click around you sometimes end up with this:

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_DvNURkplAt.png

8) When we create a brand new theme, it should populate the theme with the same as the default theme web templates instead of having no templates. Basically it should be identical to creating a fresh install.

10) Export does not output a valid url

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_OYQKti2Ua1.png

11) How does export work? Is it for the “Import from URL” feature?

https://s3.amazonaws.com/vo-random/ShareX/2024/07/Arc_s4bAaI6ovn.png

12) Most importantly, we need the ability to Switch a theme from one to another with as little website disruption as possible.

When we set a theme as active (it crashes right now I think), we should see a screen with a table of two columns:

Column 1: Current Theme Column 2: New Theme

The rows in the table should be the current theme’s web templates’ developer names.

The second column should be a drop down box of new theme’s developer names.

The platform should pre-populate a match between one theme and another theme if the developer names match.

This means that the developer names should be uniquely scoped to the Theme, not the system overall.

If no web template has a match, the drop down field in the new theme column should be blank and required. They must select a template in the new theme.

If it passes validation, then it should kick off a Background Job and we should watch the progress of all of the content items being updated to their new template.

apexdodge commented 2 months ago

Great work.

Here are some wrap-up tasks.

1) We need proper migration from 1.2.0. I see migration files for 1_3_0 and 1_3_1 but we should clean it up and just have 1.2.0 to 1.3.0 only.

I tried to run this 1.2.0 prod db: https://openwater-os.secure-platform.com/quicklyuploadfiles/file/HamptonHomecareRaytha.bacpac

with APPLY_PENDING_MIGRATIONS = true

image

and got an error saying Audit Logs table already exists. So see if you can get it all sorted out.

2) After the migration files are fixed, we do also need the raw SQL migration files as well as they live in the /db folder for those who do not want to use this APPLY_PENDING_MIGRATIONS feature and wish to handle migrations manually.

image

Make sure the manual script works on that prod db as well.

3) Delete + recreate or update existing pull request: https://github.com/RaythaHQ/raytha/pull/194 so that the pull request encompasses both the menu features and themes features as a single pull request. Not sure if its better to delete and submit a brand new pull request, or modify existing. Your call.

Summary of tasks:

killbut commented 2 months ago

In this database, there is a error with applying migrations through code. I observe that the problem is an empty __EFMigrationHistory table. It tries to apply all migrations starting from the first one. Manual script v1_2_0_to_v1_3_0.sql works on this prod db.