Skip to content

Restore beta label for the desktop editor settings #7775

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 1 commit into from
Jan 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/dashboard/src/settings/Preferences.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function Preferences() {
}
</>}
{desktopIdeOptions && <>
<h3 className="mt-12">Desktop Editor</h3>
<h3 className="mt-12">Desktop Editor <PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2 self-center">Beta</PillLabel></h3>
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: self-center is a flex related class (stands for align-self: center). It has no effect here, because the parent <h3> is not a flex container (i.e. it doesn't have the flex class, so it's using the default layout, where align-self doesn't exist / has no effect).

I think that's why the label is a little low (vertically). To fix it, you could make the <h3> a flex (also, it's generally preferable to center all the items in the flex with a items-center class on the parent, as opposed to centering each item separately using self-center on the children):

Suggested change
<h3 className="mt-12">Desktop Editor <PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2 self-center">Beta</PillLabel></h3>
<h3 className="mt-12 flex items-center">Desktop Editor <PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2">Beta</PillLabel></h3>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the insights, @jankeromnes! FWIW, I blindly copied the label component a couple of lines below but definitely worth fixing this alignement.

<h3 className="mt-12">Dotfiles <PillLabel type="warn" className="font-semibold mt-2 py-0.5 px-2 self-center">Beta</PillLabel></h3>

I think that's why the label is a little low (vertically).

Thanks for noticing this! Makes me feel a little less crazy. 🧡

<p className="text-base text-gray-500 dark:text-gray-400">Optionally, choose the default desktop editor for opening workspaces.</p>
<div className="my-4 gap-4 flex flex-wrap">
{
Expand Down