Skip to content

Conversation

@Yoda-Soda
Copy link

@Yoda-Soda Yoda-Soda commented Nov 25, 2025

  • Bookshop config removed for new split config
  • New visual editing added.
  • I've componentised some of the reused components.
  • I've removed the bootstrap css and redid it with tailwind.
  • I've removed the jquery and created custom react hooks to handle those interactive bits.
  • I've moved everything that is not reactive to astro files to fit better as an astro template.
  • Added astro image optimisation to all the images.
  • I've created an interactive react component to showcase how interactivity should be used and how visual editing would work with react.
  • I've redid the nav and made it fully accessible.
  • I've also redid the theming so updating the colours in CloudCannon would change how the template looks.

@aleksandrgordeev aleksandrgordeev requested review from AlyshaNolan and removed request for AlyshaNolan November 25, 2025 20:57
Comment on lines 22 to 38
<main id="main-content" tabindex="-1" data-editable="array" data-prop="contentBlocks" data-id-key="_name">
{
contentBlocks.map((block: any) => {
const key = block._name;
const Component = components[key];
if (!Component) {
console.warn(`Unknown component for block key '${key}'`, block);
return null;
}
return (
<div data-editable="array-item" data-id={block._name}>
<Component {...block} />
</div>
);
})
}
</main>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For page building to work fully this will need data-component-key and data-component

Suggested change
<main id="main-content" tabindex="-1" data-editable="array" data-prop="contentBlocks" data-id-key="_name">
{
contentBlocks.map((block: any) => {
const key = block._name;
const Component = components[key];
if (!Component) {
console.warn(`Unknown component for block key '${key}'`, block);
return null;
}
return (
<div data-editable="array-item" data-id={block._name}>
<Component {...block} />
</div>
);
})
}
</main>
<main id="main-content" tabindex="-1" data-editable="array" data-prop="contentBlocks" data-id-key="_name" data-component-key="_name">
{
contentBlocks.map((block: any) => {
const key = block._name;
const Component = components[key];
if (!Component) {
console.warn(`Unknown component for block key '${key}'`, block);
return null;
}
return (
<div data-editable="array-item" data-id={key} data-component={key}>
<Component {...block} />
</div>
);
})
}
</main>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tate-CC This change actually breaks some components when rendered in the Visual Editor. Could you explain what this change is intended to do? I wasn’t able to understand the purpose of the Component Editable Region from the CloudCannon documentation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be fixed by Tate in an upcoming release. For now I've pinned the astro version

@Yoda-Soda
Copy link
Author

Wow 🤩 thanks Tate. I'll work through your comments and suggestions first thing next week.

Yoda-Soda and others added 29 commits December 5, 2025 09:50
…tributes instead of `label` for CloudCannon editing.
@Yoda-Soda Yoda-Soda changed the title Refactor janit Refactor JanDit Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants