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(ui): topbar 🤝 accessibility reports #26

Merged
merged 1 commit into from
Nov 14, 2024
Merged

Conversation

nikitalpopov
Copy link
Contributor

No description provided.

Copy link
Member

@kirillgroshkov kirillgroshkov left a comment

Choose a reason for hiding this comment

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

LGTM after questions

src/browser/topbar.ts Outdated Show resolved Hide resolved
const style = canvas.style
style.position = 'fixed'
style.top = style.left = style.right = style.margin = style.padding = 0
style.zIndex = 100001
style.top = style.left = style.right = style.margin = style.padding = '0'
Copy link
Member

Choose a reason for hiding this comment

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

Is it intentional? Is a string a better/proper way to code it? If yes - I'm 👍

Same q for the next line

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 it intentional? Is a string a better/proper way to code it? If yes - I'm 👍

Yes, it is proper way according to HTMLCanvasElement type 😊 When I added const locally, the linter instantly became unhappy
Screenshot 2024-11-14 at 15 09 55

src/browser/topbar.ts Show resolved Hide resolved
Comment on lines 140 to 141
canvas.style.opacity = `${Number(canvas.style.opacity) - 0.05}`
if (Number(canvas.style.opacity) <= 0.05) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kirillgroshkov I like this less than previous code but now it is correct type-wise. What do you think? 😬

Copy link
Member

Choose a reason for hiding this comment

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

Frankly, I like how it was before :)

Previously this file was in the vendor folder, which I treat as "it's not our code, so we don't apply linters and rules for it, it just works as-is". Because of that - I feel more comfortable keeping things as-is, and making this PR a 1-liner - only adding the accessibility thing.

BTW, on accessibility. We don't currently use, and AFAIK don't plan to use topbar in production, because, for example, its UI is arbitrary/colorful and not on brand. It's only purpose is to aid in "developer mode" (similar to RedDot). Which would even be exempt from accessibility requirements. But I don't mind adding a line so accessibility audits don't scream.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously this file was in the vendor folder, which I treat as "it's not our code, so we don't apply linters and rules for it, it just works as-is". Because of that - I feel more comfortable keeping things as-is, and making this PR a 1-liner - only adding the accessibility thing.

Makes sense. Updated the PR 👍

@nikitalpopov nikitalpopov changed the title chore(ui): topbar 🤝 accessibility reports fix(ui): topbar 🤝 accessibility reports Nov 14, 2024
@kirillgroshkov kirillgroshkov merged commit e0b3e6b into master Nov 14, 2024
3 checks passed
@kirillgroshkov kirillgroshkov deleted the DEV-19964 branch November 14, 2024 19:57
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.

2 participants