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
Enable the project bar in the web component #799
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a test to check that the project name is readOnly in the WebComponent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, good call 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added them in ProjectName
src/utils/i18n.js
Outdated
@@ -227,6 +227,7 @@ i18n | |||
renameProject: "Edit project name", | |||
renameSave: "Save project name", | |||
save: "Save", | |||
integratedSave: "Log in to save project", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the SaveButton
will display this text even when the user is logged in.
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment Scott but looks great
@@ -23,7 +23,7 @@ | |||
.context-menu__item { | |||
margin: 0; | |||
background-color: inherit; | |||
color: inherit; | |||
color: var(--rpf-button-secondary-text-color); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
…ode as a result on the inherit
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! 👍
closes #775