Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Toasts don't have correct CSS when used in frontend #254

Closed
MatthewDorner opened this issue Jan 30, 2020 · 10 comments · Fixed by #593
Closed

Toasts don't have correct CSS when used in frontend #254

MatthewDorner opened this issue Jan 30, 2020 · 10 comments · Fixed by #593
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed released
Milestone

Comments

@MatthewDorner
Copy link
Contributor

🐛 Bug Report

Toasts (such as after adding a new Patient) do not have the correct theme colors applied when used in hospitalrun-frontend. This is probably an error in the build settings for the components library. Originally reported in HospitalRun/hospitalrun-frontend#1764

To Reproduce

Compare the Success toast from the components storybook https://components.hospitalrun.io/, to the one that appears when adding a new Patient from the frontend https://staging.hospitalrun.io/.

Expected behavior

Colors in frontend match colors in components storybook.

@jackcmeyer jackcmeyer added the bug Something isn't working label Jan 30, 2020
@jackcmeyer jackcmeyer added this to the v1.0.0 milestone Jan 30, 2020
@matteovivona matteovivona added the help wanted Extra attention is needed label Feb 25, 2020
@matteovivona matteovivona added the good first issue Good for newcomers label May 2, 2020
@DouglasDev
Copy link
Contributor

I would like to start contributing to this project. I'm an experienced React developer and have worked with many of the libraries that you're using. Can I be assigned this as my first issue? Thanks.

@DouglasDev
Copy link
Contributor

I ran both the front end repo and storybook locally. I found that on the front end repo, when I add a new patient, it shows a green toaster (which I think is correct?) whereas storybook shows a dark blue/grey success toaster. So they don't seem to match, but it seems that storybook is showing the wrong theme. Can somebody clarify? Thanks.

@fox1t
Copy link
Member

fox1t commented Aug 28, 2020

Nice finding! Can you include the screenshot of both of them here?

@DouglasDev
Copy link
Contributor

Screen Shot 2020-08-28 at 1 22 46 PM

Screen Shot 2020-08-28 at 1 23 06 PM

@DouglasDev
Copy link
Contributor

It may be worth taking a look at all of the toasters in storybook. I suspect a few of them may have the wrong colors.

@DouglasDev
Copy link
Contributor

It seems that for many (all?) components in storybook, the 'default' color is bright green and the 'success' color is dark blue/grey. Perhaps the two are reversed?

@DouglasDev
Copy link
Contributor

Also, I noticed that the "Design Choices" section of storybook is empty. Is there a place where we can see what the correct designs are?

@jackcmeyer
Copy link
Member

@DouglasDev the expected colors are the colors from the toasts found in the storybook. The frontend colors are not correct.

@DouglasDev
Copy link
Contributor

@jackcmeyer I think this was fixed with this pull request: #581

CreativeCreate added a commit to CreativeCreate/components that referenced this issue Sep 14, 2020
…also relate to HospitalRun#254 HospitalRun#569)

Ship components package with header injected styles (also relate to "fix HospitalRun#254" "fix HospitalRun#569"). We
inject  SCSS as <style> into <head> including bootstrap styles during the build process. This way we
can skip shipping & referencing of .scss files. Please note: now that there's no need for a .scss
references in the front-end, the main.scss reference in the front-end must be removed.

BREAKING CHANGE: we skip shipping & referencing of main.scss files. Now that there's no need for a
.scss references in the front-end, the main.scss reference in the front-end must be removed.

"fix HospitalRun#254", "fix HospitalRun#569"
jackcmeyer pushed a commit that referenced this issue Sep 15, 2020
Ship components package with header injected styles (also relate to "fix #254" "fix #569"). We
inject  SCSS as <style> into <head> including bootstrap styles during the build process. This way we
can skip shipping & referencing of .scss files. Please note: now that there's no need for a .scss
references in the front-end, the main.scss reference in the front-end must be removed.

BREAKING CHANGE: we skip shipping & referencing of main.scss files. Now that there's no need for a
.scss references in the front-end, the main.scss reference in the front-end must be removed.

"fix #254", "fix #569"
ghost pushed a commit that referenced this issue Sep 15, 2020
# [3.0.0](v2.0.1...v3.0.0) (2020-09-15)

### Bug Fixes

* **component:** ship components package with header injected styles ([afee9ff](afee9ff)), closes [#254](#254) [#569](#569) [#254](#254) [#569](#569)

### BREAKING CHANGES

* **component:** we skip shipping & referencing of main.scss files. Now that there's no need for a
.scss references in the front-end, the main.scss reference in the front-end must be removed.
@ghost
Copy link

ghost commented Sep 15, 2020

🎉 This issue has been resolved in version 3.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Sep 15, 2020
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants