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

Fix Drive table #12397

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

Fix Drive table #12397

wants to merge 29 commits into from

Conversation

somebody1234
Copy link
Contributor

Pull Request Description

  • Add background to "hidden columns" menu in the top right of the Drive table
  • Fix arrows being on separate line on "name" and "modified" columns in Drive table

Important Notes

None

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.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

@somebody1234 somebody1234 added CI: No changelog needed Do not require a changelog entry for this PR. --bug Type: bug g-dashboard labels Mar 3, 2025
@somebody1234 somebody1234 changed the title Wip/sb/flat assets fixes Fix Drive table Mar 3, 2025
Copy link

github-actions bot commented Mar 3, 2025

🧪 Storybook is successfully deployed!

📊 Dashboard:

@PabloBuchu
Copy link
Contributor

Something is still broken with the scroll bar

Screenshot 2025-03-03 at 10 43 48

@@ -337,7 +337,7 @@ const ButtonContent = memo(function ButtonContent(props: ButtonContentProps) {
styles={styles}
hideLoader={hideLoader}
/>
<Text color="inherit" truncate="1" className={styles.text()}>
<Text weight="custom" color="inherit" truncate="1" className={styles.text()}>
Copy link
Contributor

@MrFlashAccount MrFlashAccount Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the second though - why did we add the <Text /> component here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh right. mainly so I could get ellipsis + hover tooltip when the timezone is too long:
image

... granted, that should not be a button since it is not interactable, I am just using it as a hack to have an icon and text that are (or are supposed to be) pre-aligned

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any better suggestions?

Copy link
Contributor

@MrFlashAccount MrFlashAccount Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Buttons (actions) shouldn't be truncated and should use active verbs. What does this button do?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhh... nothing 😅 - as above, just using it as a hack to get a pre-aligned icon + text combo. i guess ideally we could refactor this out to a style-only component and then use that instead of a full on Button...

either way Text has been refactored away from Button again anyway

Copy link
Contributor

@MrFlashAccount MrFlashAccount Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, lets use just a <Text /> element instead of button here.

i guess ideally we could refactor this out to a style-only component

Yeah, we can add this pattern as a pattern (https://panda-css.com/docs/concepts/patterns) using tv function.

Also we do the same here so we can base the receipt on this: https://github.com/enso-org/enso/blob/wip/sergeigarin/flat-folder-structure-follow-up/app/gui/src/dashboard/components/Breadcrumbs/BreadcrumbItem.tsx#L206

@@ -337,9 +337,7 @@ const ButtonContent = memo(function ButtonContent(props: ButtonContentProps) {
styles={styles}
hideLoader={hideLoader}
/>
<Text color="inherit" truncate="1" className={styles.text()}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to have a span with className={styles.text()}, haven't we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, i tried extracting the css directly and it doesn't seem to work.
try running this commit in dev (staging env) and create a project execution (no repeats to minimize load, but long timezone to (try to) trigger the truncate class):

438c4f3

}

/** A text display with an icon. */
export function IconDisplay<IconType extends string>(props: IconDisplayProps<IconType>) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I told about patterns I meant only the ICON_DISPLAY_STYLES part,

Copy link
Contributor Author

@somebody1234 somebody1234 Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess, but i do want a dedicated component to avoid having to rewrite the markup (and get it right) every time, unless you have a better idea

'8': 'line-clamp-8 ellipsis',
'9': 'line-clamp-9 ellipsis',
custom: 'line-clamp-[var(--line-clamp)] ellipsis',
'1': 'block truncate',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did we remove ellipsis here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is ellipsis a valid tailwind class name?

data-current
aria-current="page"
textSelection="none"
elementType="a"
icon={icon}
isCurrent={isCurrent}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IconDisplay isCurrent ? isDisabled ?

@@ -104,14 +103,11 @@ function DashboardInner(props: DashboardProps) {
const initialProjectName = initialLocalProjectPath != null ? null : initialProjectNameRaw

const categoriesAPI = useCategoriesAPI()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did we move the refetch directories though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we no longer batch refetch directories since there is no longer a tree, no? so only one directory ever needs to be refetched at any time

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

Successfully merging this pull request may close these issues.

4 participants