-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
✨ Separation of logic: migrating to Astro Theme Provider #77
Conversation
[skip ci]
…nd function helpers) (#79) * Create draft PR for #78 [skip ci] * add new workflows to send messages for first time contributors * Update firsttimepr.yml * ♻️ Chore: Update Database Start page to reflect new theme and utilize batch transactions (#76) * Create draft PR for #71 [skip ci] * Update - New setup page and done page implemented. as well as some OptionsSchema cleanup * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/done.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * update as per dreyfus's comment * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com> --------- Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com> Co-authored-by: Adam Matthiesen <amatthiesen@outlook.com> Co-authored-by: Adam Matthiesen <30383579+Adammatthiesen@users.noreply.github.com> Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com> * Update firsttimepr.yml * Create draft PR for #78 [skip ci] * Chore: Update Security implementation for local username/password auth and start the process of converting the dashboad edit pages to utilitze HTMX based server rendering * new schema is working! Woo! This will give tons of future options! * more progress updates * dashboard update progress checkpoint * another progress checkpoint... dashboard is coming along nicely * fix old reference about page being a post * new helper function to get content * update so frontend doesn't cry about new schema * progress update - updated frontend to use new content helper and removed old page schema * chore: Update astro:db:setup hook in studioCMS.ts * I think everything is updated and working properly. just running tests now * Add getUserById and getUserList helper functions to the contentHelper module for retrieving user data from the Astro Studio's Database. * chore: Update registration API to validate email address before creating a new user and use it to generate a gravatar avatar for local users without oAuth * more cleanup * chore: Update StudioCMS config handling and error messages * update config and admin pages to reflect new UI changes * Update types and fix typos created from that * new navbar component working and can be customized * update navigation * Update .github/workflows/firsttimepr.yml Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/index.ts Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/done.astro Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com> * Update packages/studioCMS/src/components/exports/Navigation.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * Update packages/studioCMS/src/components/exports/Navigation.astro Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com> * update helptext on admins page * Update close button ID in Header component * chore: Update optionsSchema in studioCMS.ts --------- Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com> Co-authored-by: Adam Matthiesen <amatthiesen@outlook.com> Co-authored-by: Bryce Russell <brycetrussell@gmail.com> Co-authored-by: Adam Matthiesen <30383579+Adammatthiesen@users.noreply.github.com> Co-authored-by: Jacob Jenkins <7649031+jdtjenkins@users.noreply.github.com> Co-authored-by: Paul Valladares <85648028+dreyfus92@users.noreply.github.com>
…es getting put on pages they werent supposed to be getting put on
…s instead of local file
…nternal things on the dashboard... this will make things way easier)
…custom version for now due to lack of updates)
...oCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/delete/pages/[...slug].astro
Outdated
Show resolved
Hide resolved
showSuccessToast = true; | ||
}) | ||
// biome-ignore lint/suspicious/noExplicitAny: <explanation> | ||
.catch((e: any) => { |
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.
Eventually it's probably worth thinking of some global error catching/handling/displaying mechanism, but this is fine for now.
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.
Logic handling for these pages in regards to editing the database is to be moved to an API Endpoint for better response handling and toasting (see the start of this in the other pages, such as auth routes)
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.
We could use the effect pattern
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.
We could use the effect pattern
interesting... never seen that, but honestly, with Astro's API endpoints, i think those should be enough being able to return proper responses. (the current plan that I've been building towards since i have to move all the logic anyway so that its easier to interact from different dashboard pages)
...oCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/delete/pages/[...slug].astro
Outdated
Show resolved
Hide resolved
...oCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/delete/pages/[...slug].astro
Outdated
Show resolved
Hide resolved
...dioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/edit/pages/[...slug].astro
Outdated
Show resolved
Hide resolved
...dioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/edit/pages/[...slug].astro
Outdated
Show resolved
Hide resolved
...dioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/edit/pages/[...slug].astro
Outdated
Show resolved
Hide resolved
...dioCMS/src/integrations/studioCMSDashboard/routes/dashboard/pages/edit/pages/[...slug].astro
Outdated
Show resolved
Hide resolved
id="slug" | ||
name="slug" | ||
class="border-solid border-2 border-gray-300 rounded-lg p-2 w-96" | ||
<div class="container"> |
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.
tbh with ya, I'd like new and edit to just be the same component but just given different default values. So thatthe view, new and edit psges dont repeat the same stuff
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.
There will be a few changes and updates with the planned API endpoint system (including trying to componentize as many of the pages that are duplicating info as possible! (and moving to astrolace now that i have that working)
Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com>
…dashboard/pages/delete/pages/[...slug].astro Co-authored-by: Jacob Jenkins <jacob_jenkins@live.com>
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.
So far looking good, just a couple of comments. 😁
showSuccessToast = true; | ||
}) | ||
// biome-ignore lint/suspicious/noExplicitAny: <explanation> | ||
.catch((e: any) => { |
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.
We could use the effect pattern
...es/studioCMS/src/integrations/studioCMSDashboard/routes/dashboard/partials/LivePreview.astro
Outdated
Show resolved
Hide resolved
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.
LGTM, but i think you still gotta resolve conflicts on your branch 😁
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.
Approving for now! Let's get it out, anything else can be fixed later!
Looks really good @Adammatthiesen , incredible work
!coauthors |
!coauthor |
|
Original issue description
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
I would like to see StudioCMS be split into separate packages
This would allow users to use the core package if they want a CMS for their own routes (like a traditional CMS), and use themes if they want to use pre-built routes for a blog, docs, etc.
This separation of packages is a perfect opportunity to migrate towards Astro Theme provider. Astro Theme Provider already has the APIs that StudioCMS needs to facilitate this migration, and it would simplify the integration code.
Describe alternatives you've considered
One alternative is to not use Astro Theme Provider, but continuing with the current structure has some problems:
Additional context
I am willing to take ownership of this issue. I am looking for opinions/permission before tackling such a large change, I am available to chat if anyone has questions or wants a more detailed explanation than what I can do in text.
closes #50