Skip to content

feat: improve appearing controls styles #1436

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

Merged
merged 2 commits into from
Oct 17, 2024
Merged

feat: improve appearing controls styles #1436

merged 2 commits into from
Oct 17, 2024

Conversation

Raubzeug
Copy link
Contributor

@Raubzeug Raubzeug commented Oct 10, 2024

closes #1045

Stand

CI Results

Test Status: ✅ PASSED

📊 Full Report

Total Passed Failed Flaky Skipped
134 134 0 0 0

Bundle Size: 🔽

Current: 78.94 MB | Main: 78.97 MB
Diff: 0.03 MB (-0.04%)

✅ Bundle size decreased.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@Raubzeug Raubzeug requested review from artemmufazalov and astandrik and removed request for astandrik October 10, 2024 11:44
<Button size="s" href={href} className={b({visible}, className)} target="_blank">
<Icon data={ArrowUpRightFromSquare} />
<Button size={size} href={href} className={b({visible}, className)} target="_blank">
<Icon data={ArrowUpRightFromSquare} size={buttonSizeToIconSize[size]} />
Copy link
Collaborator

@astandrik astandrik Oct 11, 2024

Choose a reason for hiding this comment

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

I suppose we can use Button Icons as here

<Button size="xs">
    <Button.Icon>
        <ArrowsRotateLeft />
    </Button.Icon>
</Button>;

and icon size should be set automatically according to button size

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Discussed with uikit team, button doesn't affect it's icon size. We should explicitly set icon size we want.

@Raubzeug Raubzeug requested a review from astandrik October 14, 2024 16:15
@@ -93,9 +93,14 @@ body,
.ydb-paginated-table__row,
.ydb-tree-view__item {
&:hover {
Copy link
Member

Choose a reason for hiding this comment

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

Since you add padding only here, you should also add padding for focused state. Now if I select button with Tab, it won't have right padding

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I refactored styles. Wrapper is only needed on hover. If buttons are focused from keyboard, they should be shown separately.

Comment on lines +108 to +110
{additionalControls && (
<span className={b('additional-controls')}>{additionalControls}</span>
)}
Copy link
Member

Choose a reason for hiding this comment

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

DeveloperUIButton is controlled by display: none and display: inline-block. It cannot be selected with Tab. Two ways possible:

  1. All buttons in the UI should be keyboard accessible, so this DeveloperUIButton button should be updated too

  2. We don't need to make buttons in table keyboard accessible (for me in tables it doesn't make much sense anyway), so we can stick to previous solution, but update only ClipboardButton

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lets try the hardest way number 1. I hope I've found a solution.

artemmufazalov
artemmufazalov previously approved these changes Oct 16, 2024
@Raubzeug Raubzeug enabled auto-merge October 17, 2024 05:15
@Raubzeug Raubzeug added this pull request to the merge queue Oct 17, 2024
Merged via the queue into main with commit 830c0a5 Oct 17, 2024
6 checks passed
@Raubzeug Raubzeug deleted the 1045-clipboard branch October 17, 2024 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clipboard button
3 participants