Enable the project bar in the web component#799
Conversation
|
|
|
|
…_project_bar_in_the_web_component
|
|
|
…ithProjectbar prop
|
|
| <DownloadButton | ||
| buttonText={t("header.download")} | ||
| className="project-bar__btn btn--download" | ||
| className="btn btn--tertiary project-bar__btn" | ||
| Icon={DownloadIcon} | ||
| type="tertiary" | ||
| /> | ||
| </div> |
There was a problem hiding this comment.
I think I'm there with it now but it took a while longer than I thought + I went deeper than expected too 😅
| })} | ||
| onClick={onClickSave} | ||
| text={t("header.save")} | ||
| text={t(webComponent ? "header.integratedSave" : "header.save")} |
There was a problem hiding this comment.
The header.integratedSave text is "Log in to save project" but I don't think the button triggers a log in.
If the user is logged in, should the text change to "Save"?
Could the ProjectBar render a LogIn button with the log in prompt if there's no user, and render the SaveButton only once a user has logged in?
There was a problem hiding this comment.
Very good point. I'm not sure I'm a massive fan of moving away from "Save" anyway and it adds a fair bit of complexity to it. I'm not 100% convinced I'd be able to easily toggle this when its integrated 🤔
| expect(screen.queryByText("header.newProject")).toBeInTheDocument(); | ||
| }); | ||
| }); | ||
|
|
There was a problem hiding this comment.
Should we add a test to check that the project name is readOnly in the WebComponent?
src/utils/i18n.js
Outdated
| renameProject: "Edit project name", | ||
| renameSave: "Save project name", | ||
| save: "Save", | ||
| integratedSave: "Log in to save project", |
There was a problem hiding this comment.
I think the SaveButton will display this text even when the user is logged in.
|
|
PetarSimonovic
left a comment
There was a problem hiding this comment.
Looks great Scott! Just noticed a couple of things on the file buttons
| text={`${file.name}.${file.extension}`} | ||
| icon={<FileIcon ext={file.extension} />} | ||
| type="tertiary" | ||
| textAlways |
There was a problem hiding this comment.
Looks like there might be some styling tweaks needed for the tertiary button/files-list-items
Projects
I don't think the button on Projects is receiving the .files-list-item styles. When I moved FilePanel.scss to the end of InternalStyles.scss it seemed to work, so perhaps it's something to do with the hierarchy in that doc
Standalone dark mode
This has a slightly different shade on the border. I think the issue might be with --rpf-files-list-item-hover
There was a problem hiding this comment.
it feels a little hacky with the !important's but other than reverting the buttons and sorting out theming again in 2 separate places it feels like the best approach for now
|
|
|
PetarSimonovic
left a comment
There was a problem hiding this comment.
One last comment Scott but looks great
| margin: 0; | ||
| background-color: inherit; | ||
| color: inherit; | ||
| color: var(--rpf-button-secondary-text-color); |
|
|
…ode as a result on the inherit
|
|






closes #775