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

Update dashboard to design v122 (Part 1) #9896

Open
wants to merge 34 commits into
base: develop
Choose a base branch
from

Conversation

somebody1234
Copy link
Collaborator

Pull Request Description

  • Close Update the Dashboard to Newest Design #9886

    • Update style of buttons in Drive Bar
    • Move "Home" page into a "Start" dialog
    • Remove icons that are no longer needed
    • Remove Backend Switcher in top bar - they have now been converted to categories
  • Incidental changes

    • Refactor Backend provider so that both Remote and Local backends are available.
      • This was done because both Cloud and Local backends are now easily accessible by switching tabs - the Local backend no longer has its own views with the hidden category switcher

Important Notes

None

Code review tips

  • There are a lot of changes in Settings components, for example (and in general, any component that needs to use a backend). However, most of the changes are identical, so only the approach needs to be reviewed - although the settings pages and the other pages should probably be reviewed separately.

Testing instructions

  • Make sure new/changed features work, as mentioned above (drive bar, start page, drag-n-drop)
  • Because of the backend changes, all flows in general should be checked, at least at a basic level:
    • Sign up/sign in
    • Offline mode (bottom link on login screen on desktop app)
    • Checking that all settings pages work, both when logged in and not logged in

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.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    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.

@somebody1234 somebody1234 added CI: No changelog needed Do not require a changelog entry for this PR. x-new-feature Type: new feature request g-dashboard labels May 9, 2024
@somebody1234
Copy link
Collaborator Author

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.

@PabloBuchu
Copy link
Contributor

  1. This loader is barely moving when running cloud project
Screenshot 2024-05-20 at 16 16 55
  1. After cmd+r when having project open in progress I no longer see calls projects/<project_id> so I had to reload again to gain access to opened project

@somebody1234
Copy link
Collaborator Author

This loader is barely moving when running cloud project

weird, i seem to be able to reproduce on develop. seems like it might be a regression

@somebody1234
Copy link
Collaborator Author

After cmd+r when having project open in progress I no longer see calls projects/<project_id>

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.)

@MrFlashAccount
Copy link
Contributor

MrFlashAccount commented May 24, 2024

@somebody1234 could you please rebase onto the latest changes so I can review the PR?

@somebody1234
Copy link
Collaborator Author

@MrFlashAccount latest changes pulled.

@@ -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">
Copy link
Contributor

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

Copy link
Collaborator Author

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

Copy link
Contributor

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

Copy link
Collaborator Author

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(() => {
Copy link
Contributor

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 => {
Copy link
Contributor

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

@@ -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;
Copy link
Contributor

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',
Copy link
Contributor

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

Copy link
Collaborator Author

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)',
Copy link
Contributor

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)',
Copy link
Contributor

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': '',
Copy link
Contributor

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

@MrFlashAccount
Copy link
Contributor

QA ⛔️

  1. Can we improve the drag experience to look similar to Google Drive? Currently, if user have a lot of assets, the DND button is hidden.
    https://github.com/enso-org/enso/assets/61194245/066d2aa7-cbfe-415f-88ac-2e8b4738fa43
  2. Invitations disappeared in settings
  3. Buttons are not aligned (use ariaComponents.Button)
    CleanShot 2024-05-27 at 12 49 30

@somebody1234
Copy link
Collaborator Author

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR. g-dashboard x-new-feature Type: new feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update the Dashboard to Newest Design
3 participants