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

fix: error colour precedence in message wrapper #112

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

JBR90
Copy link
Contributor

@JBR90 JBR90 commented Sep 10, 2024

Description

Type 'user' was overriding background colour of the chat message box for generic and moderation error messages on reload of the page.

  • Change order of classes so errorType has precedence.

Issue(s) - AI-527

https://www.notion.so/oaknationalacademy/Sensitive-warnings-lose-colour-d1b3361edcf7478ea3b04f7be844a7ce

How to test

  1. Go to https://oak-ai-lesson-assistant-p6i18zgf9.vercel-preview.thenational.academy
    Create a lesson with sensitive content, refresh the page, sensitive content box remains mint green colour

Checklist

  • Manually tested across browsers / devices
  • Considered impact on accessibility
  • Does this PR update a package with a breaking change

Copy link

vercel bot commented Sep 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oak-ai-lesson-assistant ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 10, 2024 4:13pm

Copy link

Copy link

Playwright e2e tests

Job summary

Download report

To view traces locally, unzip the report and run:

npx playwright show-report ~/Downloads/playwright-report

@JBR90 JBR90 requested a review from a team September 10, 2024 16:22
@JBR90 JBR90 marked this pull request as ready for review September 10, 2024 16:33
Copy link
Collaborator

@codeincontext codeincontext left a comment

Choose a reason for hiding this comment

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

Is this your first PR on the repo? If so, welcome!

I noticed that MessageWrapperProps has type: "user" | "editing" | "warning" | "moderation" | "aila";. Should the type be moderation rather than user?

@JBR90
Copy link
Contributor Author

JBR90 commented Sep 11, 2024

Is this your first PR on the repo? If so, welcome! -

Thanks!

I noticed that MessageWrapperProps has type: "user" | "editing" | "warning" | "moderation" | "aila";. Should the type be moderation rather than user?

The type for messages with the changing colour are user with errorType moderation

image

type: "user" | "editing" | "warning" | "moderation" | "aila";

errorType: "generic" | "moderation" | null;

Should they be coming through as type = moderation ?

@codeincontext
Copy link
Collaborator

codeincontext commented Sep 11, 2024

type: "user"

Ah, I see. I didn't realise that it was user with errorType: "moderation. I think that's how it has always been, though I'm sure it could be improved if needed later. Maybe it has the moderation type when it first appears, but it gets persisted as user? I'll approve as the change you have here makes sense and solves the problem

@JBR90 JBR90 merged commit bd75989 into main Sep 11, 2024
16 checks passed
@JBR90 JBR90 deleted the fix-sensitive-warnings-lose-colour branch September 11, 2024 14:13
@oak-machine-user
Copy link
Collaborator

🎉 This PR is included in version 1.8.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants