Skip to content

add loading loader to wc loader#1447

Merged
cocomarine merged 13 commits intomainfrom
1295-improve-wc-loading-indicator
Apr 27, 2026
Merged

add loading loader to wc loader#1447
cocomarine merged 13 commits intomainfrom
1295-improve-wc-loading-indicator

Conversation

@cocomarine
Copy link
Copy Markdown
Contributor

@cocomarine cocomarine commented Apr 24, 2026

Closes https://github.com/RaspberryPiFoundation/digital-editor-issues/issues/1295

Notes

  • Another loader from editor-standalone appears in the middle of the page before editor-ui loader appears
  • Added a Loader component that is similar to the one in standalone and used it to show loading in the same place with a similar style as standalone
  • Also added a LoadFailed component
  • When 'Try again' is clicked, it reloads the page.
  • Briefly looked into coordinating editor-ui and standalone loaders but decided to take a simpler route for now.

Screenshots

Screenshot 2026-04-24 at 14 43 07 Screenshot 2026-04-27 at 08 14 20
  • When in dark theme:
Screenshot 2026-04-27 at 13 38 58 Screenshot 2026-04-27 at 14 00 30

Copilot AI review requested due to automatic review settings April 24, 2026 11:28
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 11:29 — with GitHub Actions Inactive
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated loading indicator for the web component loader flow, replacing the previous text-only loading message.

Changes:

  • Introduces a new Loader React component and corresponding SCSS styling.
  • Updates WebComponentLoader to render the new loader during the loading state.
  • Adds a new i18n string for the loader text and includes loader styles in the internal stylesheet bundle.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/containers/WebComponentLoader.jsx Swaps the loading-state UI from a translated <p> to the new Loader, and injects internal styles during loading.
src/components/Loader/Loader.jsx Adds a new reusable loading indicator component with optional display + delay.
src/assets/stylesheets/Loader.scss Defines loader visuals (animated braces + text) and dark-theme overrides.
src/assets/stylesheets/InternalStyles.scss Includes Loader.scss in the internal styles bundle so it’s available in the WC context.
public/translations/en.json Adds a new loadingStates.loading string used by the new loader.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Loader/Loader.jsx Outdated
Comment thread src/components/Loader/Loader.jsx Outdated
Comment thread src/containers/WebComponentLoader.jsx Outdated
Comment thread public/translations/en.json Outdated
Comment thread src/components/Loader/Loader.jsx Outdated
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 11:53 — with GitHub Actions Inactive
@cocomarine cocomarine marked this pull request as draft April 24, 2026 13:23
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 13:44 — with GitHub Actions Inactive
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 13:47 — with GitHub Actions Inactive
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 13:57 — with GitHub Actions Inactive
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 14:11 — with GitHub Actions Inactive
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 14:43 — with GitHub Actions Inactive
@cocomarine cocomarine marked this pull request as ready for review April 24, 2026 14:52
@maxelkins
Copy link
Copy Markdown
Contributor

maxelkins commented Apr 24, 2026

I think this is an improvement on the current failed state 👍

Potential iteration (not required if you just wanna ship it)

What normally fixes this? Is it just a refresh? Could we have:

"Load failed. Try again"

  • Try again triggers a refresh
  • Load failed can be the normal text colour

@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 15:39 — with GitHub Actions Inactive
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 24, 2026 15:40 — with GitHub Actions Inactive
@maxelkins
Copy link
Copy Markdown
Contributor

@cocomarine Would make "Try again" the link colour (like on the homepage) and then lets get this in. We can take a look in detail when we have more time 👍

Thank you!

@cocomarine cocomarine temporarily deployed to previews/1447/merge April 27, 2026 07:15 — with GitHub Actions Inactive
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 27, 2026 08:07 — with GitHub Actions Inactive
@DNR500
Copy link
Copy Markdown
Contributor

DNR500 commented Apr 27, 2026

I think it might need an ever so slight spacing adjustment to match the one in standalone

editor-standalone
loader-standalone

editor-ui
loader-spacing-editor-ui

Might also need change the text color when dark mode too?
loader-editor-ui-dark

Would be nice at some point to move this into the design system so we can more easily keep this consistent

@zetter-rpf zetter-rpf requested a review from DNR500 April 27, 2026 11:20
Copy link
Copy Markdown
Contributor

@DNR500 DNR500 left a comment

Choose a reason for hiding this comment

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

Dropped a comment on with some suggestions for smaller changes - but this is going to look a lot better. Thanks for this

Co-authored-by: Copilot <copilot@github.com>
@cocomarine cocomarine temporarily deployed to previews/1447/merge April 27, 2026 13:12 — with GitHub Actions Inactive
@cocomarine cocomarine merged commit 725ac69 into main Apr 27, 2026
7 checks passed
@cocomarine cocomarine deleted the 1295-improve-wc-loading-indicator branch April 27, 2026 13:25
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.

4 participants