Skip to content
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

Delay metadata component load until after config is received #553

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

IshavSohal
Copy link
Member

@IshavSohal IshavSohal commented Feb 19, 2025

Related Item(s)

#521

Changes

  • Prevent the metadata content component from loading in (via setting loadStatus to 'loaded') until the product's config is received from the server
  • Fix issue with broadcastToClients() in the server

Testing

Steps:

  1. Load in a large product (ex. TCEI)
  2. Notice that the metadata component loads in with all metadata visible (i.e. no N/A values, unless explicitly left blank)
  3. Click Next to proceed to editor-main
  4. There should be no toast with the message "No config exists for storylines product"

This change is Reviewable

@IshavSohal IshavSohal added the PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review. label Feb 19, 2025
Copy link

Your demo site is ready! 🚀 Visit it here: https://ramp4-pcar4.github.io/storylines-editor/issue-521

Copy link
Member

@szczz szczz left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @IshavSohal)


server/index.js line 601 at r1 (raw file):

    const payload = JSON.stringify(message);
    clients.forEach((client) => {
        if (client.readyState === WebSocketServer.OPEN) {

Please remove the changes to index.js. The spacing to the types are fine but WebSocketServer.OPEN should be set to WebSocket.OPEN or 1 locally. Otherwise this works well.

Copy link
Member Author

@IshavSohal IshavSohal left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @szczz)


server/index.js line 601 at r1 (raw file):

Previously, szczz (Matt Szczerba) wrote…

Please remove the changes to index.js. The spacing to the types are fine but WebSocketServer.OPEN should be set to WebSocket.OPEN or 1 locally. Otherwise this works well.

Donethanks

Copy link
Member

@szczz szczz left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @IshavSohal)

Copy link
Member

@yileifeng yileifeng left a comment

Choose a reason for hiding this comment

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

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @IshavSohal)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Frontend PR that primarily involves frontend changes. UI experts and CSS Wizards are asked to review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants