-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
♻️ Chore: Setup new Table Schemas, and Implement Helpers (component and function helpers) #79
Conversation
[skip ci]
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2024-05-11 08:50:38 CET |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2024-05-11 08:50:25 CET |
The preview deployment is ready. 🟢 Open Preview | Open Build Logs Last updated at: 2024-05-11 08:50:18 CET |
… 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 <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/setup.ts Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Paul Valladares <[email protected]> * update as per dreyfus's comment * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Jacob Jenkins <[email protected]> * Update packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro Co-authored-by: Jacob Jenkins <[email protected]> --------- Co-authored-by: create-issue-branch[bot] <53036503+create-issue-branch[bot]@users.noreply.github.com> Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Adam Matthiesen <[email protected]> Co-authored-by: Paul Valladares <[email protected]> Co-authored-by: Jacob Jenkins <[email protected]>
[skip ci]
…totype into issue-0078
…h and start the process of converting the dashboad edit pages to utilitze HTMX based server rendering
…ved old page schema
… module for retrieving user data from the Astro Studio's Database.
…ing a new user and use it to generate a gravatar avatar for local users without oAuth
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.
Amazing work @Adammatthiesen, just left a couple of comments.
import "./navigation.css"; | ||
|
||
type Props = { | ||
topLevelLinkCount?: number; |
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.
What's topLevelLinkCount
?
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.
it creates a navigation map of any page with the showOnNav option on the table as true as such:
topLevelLinkCount: 3
{ Page1, Page2, Page3, More: { Page4, Page5 } }
This is for a front-end Navigation component to replace the old front-end header :)
|
||
type Props = { studioCMSSocials: StudioCMSSocials }; | ||
const { studioCMSSocials: { github: githubURL } } = Astro.props as Props; |
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.
The type assertion shouldn't be needed, it should be infered without it.
const { studioCMSSocials: { github: githubURL } } = Astro.props as Props; | |
const { studioCMSSocials: { github: githubURL } } = Astro.props; |
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.
Huh does it? I always do as Props
... 👀
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.
it does infer... but i noticed this also helps when the language server crashes... so i've been adding it in when i needed it instead of restarting the Language server
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.
Just a few comments @Adammatthiesen !
Great work though, this is looking siiiiiiiiiiick
<div class="navigation"> | ||
<div class="title"><a href={baseSiteURL}>{title}</a></div> | ||
{ | ||
links.slice(0, topLevelLinkCount).map(({ text, href }) => ( |
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.
Is there any way to just either not push these links into the array, or remove them before we get to the template? Feels weird to be modifying this array inside the template
<div class="dropdown"> | ||
<button>More ▼</button> | ||
<div class="dropdown-content"> | ||
{ links.slice(topLevelLinkCount).map(({ text, href }) => ( |
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.
Same here with the slicing! Also, this one doesn't have a count... So I actually don't know what happens but I feel nothing good
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.
its just a using the count as a starting point in this situation. i'm using Slice to get the first 3 links and then throwing the rest into a dropdown for the front-end stuff with it all being controlled by a true/false variable on the PageData table
|
||
.navigation .title { | ||
font-size: xx-large; | ||
color: black; |
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.
Don't mind for now since we don't have official branding. But this should probably be an off-black
packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/done.astro
Outdated
Show resolved
Hide resolved
<text class="text-lg py-2"> | ||
<text class="font-bold">What is StudioCMS?</text> | ||
<br /> | ||
StudioCMS is a simple, easy to use, and fast CMS for Astro. It's built with the latest technologies and is designed to be as simple as possible. It's also open source and free to use. |
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.
This should eventually just be a link to the docs 😂
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.
This was created before this was even much more than a thought... Its kinda just placeholder information till we have docs and everything setup
packages/studioCMS/src/integrations/studioCMSDashboard/routes/databaseSetup/main.astro
Show resolved
Hide resolved
//@ts-expect-error - show is not a standard method on HTMLElement it comes from `Shoelace.syle` | ||
localAdmin.show(); | ||
//@ts-expect-error - hide is not a standard method on HTMLElement it comes from `Shoelace.syle` | ||
oauthAdmin.hide(); |
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.
Hmmmmmmmmmmmm wonder if we should make like custom types for these things.. I really hate all these ts expect errors.
Something like
type SLHTMLElement = HTMLElement & {
show: () => void;
hide: () => void;
etc
}
} | ||
}); | ||
|
||
document.forms[0]?.addEventListener("submit", async (e) => { |
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.
I see cheeky. Can this form reference be a document.getElemenyById
in case we ever introduce more forms we don't need to fix this
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.
In this case, atleast for now i think it should be fine, since this is only the First time setup page, and primarily used only to setup the tables with some dummy data to get started as well as the permission setup
Co-authored-by: Jacob Jenkins <[email protected]>
Co-authored-by: Jacob Jenkins <[email protected]>
…databaseSetup/done.astro Co-authored-by: Jacob Jenkins <[email protected]>
Co-authored-by: Paul Valladares <[email protected]>
Co-authored-by: Paul Valladares <[email protected]>
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.
Let's ship this, looks good to me! 🚢
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.
I think is so cool! I love it all! Lets ship it fam 🚢
Looks like this covers everything we talked about, ship it! 🚢🚀 |
!coauthor |
|
Original issue description
Step one of #77
closes #78