-
Notifications
You must be signed in to change notification settings - Fork 316
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
Update dashboard to design v122 (Part 1) #9896
base: develop
Are you sure you want to change the base?
Conversation
Lots more refactors still need to be done so that both backends are always present
I guess I'll avoid stacking the move to tabs on top of this PR, as this is a big PR so there may be a lot of changes needed. |
weird, i seem to be able to reproduce on develop. seems like it might be a regression |
ah. i guess we should store the "currently open project" immediately when the user clicks play, rather than after it actually opens. it's late though so probably won't be fixed today (and possibly will fix on the tabs PR instead.) |
@somebody1234 could you please rebase onto the latest changes so I can review the PR? |
@MrFlashAccount latest changes pulled. |
app/ide-desktop/lib/dashboard/src/components/AriaComponents/Dialog/Dialog.tsx
Outdated
Show resolved
Hide resolved
@@ -150,6 +152,11 @@ export function Dialog(props: types.DialogProps) { | |||
<div className="relative flex-auto overflow-y-auto p-3.5"> | |||
{typeof children === 'function' ? children(opts) : children} | |||
</div> | |||
{closeButton === 'floating' && ( | |||
<div className="m-floating-buttons absolute flex gap-1"> |
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.
Don't use m-floating-buttons
or any other custom classes, because they make no sense and breaks style deduplication
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.
style deduplication should not be a concern though
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's always a concern
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.
but why?
@@ -204,14 +184,35 @@ export default function ProjectIcon(props: ProjectIconProps) { | |||
) | |||
|
|||
React.useEffect(() => { |
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.
Please don't do async logic in useEffect. Use useQuery
or useMutation
instead.
@@ -272,6 +266,15 @@ export default function ProjectIcon(props: ProjectIconProps) { | |||
setShouldSwitchPage(event.shouldAutomaticallySwitchPage) | |||
setIsRunningInBackground(event.runInBackground) | |||
void openProject(event.runInBackground) | |||
void backend.getProjectDetails(item.id, item.parentId, item.title).then(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.
Do not fetch directly in event handles, use react-query
app/ide-desktop/lib/dashboard/src/components/dashboard/ProjectNameColumn.tsx
Outdated
Show resolved
Hide resolved
@@ -156,11 +156,12 @@ | |||
--auth-link-padding-x: 0.5rem; | |||
--auth-link-padding-y: 0.25rem; | |||
--text-link-padding-x: 0.25rem; | |||
/* The margin between a floating button and the edge of its window. */ | |||
--floating-buttons-margin: 1.1875rem; |
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.
Don't use custom margins
'hover-bg': 'rgb(0 0 0 / 10%)', | ||
frame: 'var(--frame-color)', | ||
'selected-frame': 'var(--selected-frame-color)', | ||
'ide-bg': '#ebeef1', | ||
selected: 'rgb(255 255 255 / 40%)', | ||
'not-selected': 'rgb(0 0 0 / 15%)', | ||
'window-close': '#ff605c', |
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.
use generic names instead of specific names
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.
this is the generic name, this is the macos close color
@@ -94,6 +98,7 @@ export default /** @satisfies {import('tailwindcss').Config} */ ({ | |||
'chat-profile-picture': 'var(--chat-profile-picture-size)', | |||
'selection-brush-border': 'var(--selection-brush-border-width)', | |||
'button-focus-ring-inset': 'var(--button-focus-ring-inset)', | |||
'negative-button-focus-ring-inset': 'calc(var(--button-focus-ring-inset) * -1)', |
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.
don't use custom spacings
@@ -345,6 +346,7 @@ export default /** @satisfies {import('tailwindcss').Config} */ ({ | |||
'date-input-calendar-gap': 'var(--date-input-calendar-gap)', | |||
'context-menu-macos-half-x': 'var(--context-menu-macos-half-width)', | |||
'context-menu-half-x': 'var(--context-menu-half-width)', | |||
'floating-buttons': 'var(--floating-buttons-margin)', |
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.
use only generic classes
@@ -498,6 +501,9 @@ inset 0 -36px 51px -51px #00000014`, | |||
'@apply disabled:opacity-30 [&.disabled]:opacity-30 disabled:cursor-not-allowed [&.disabled]:cursor-not-allowed opacity-50 hover:opacity-75 transition-all': | |||
'', | |||
}, | |||
'.selectable-light': { | |||
'@apply opacity-25': '', |
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.
don't use appy and custom classes unless you have to
QA ⛔️
|
re: 3 - most style issues were fixed in the second PR. i figured it's easier to implement it once rather than having to backport. thoughts? |
Pull Request Description
Close Update the Dashboard to Newest Design #9886
Incidental changes
Important Notes
None
Code review tips
Testing instructions
Screencasts
dashboard-122.mp4
Checklist
Please ensure that the following checklist has been satisfied before submitting the PR:
The documentation has been updated, if necessary.Scala,
Java,
TypeScript,
and
Rust
style guides. In case you are using a language not listed above, follow the Rust style guide.
Unit tests have been written where possible.