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

[dashboard] Don't double-encapsulate Alert contents in <span/> or <p/> #13640

Merged
merged 1 commit into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
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/AppNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function AppNotifications() {
showIcon={true}
className="flex rounded mb-2 w-full"
>
<span>{topNotification}</span>
{topNotification}
{getManageBilling()}
</Alert>
</div>
Expand Down
8 changes: 3 additions & 5 deletions components/dashboard/src/admin/BlockedRepositories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ export function BlockedRepositoriesList(props: Props) {
</div>

<Alert type={"info"} closable={false} showIcon={true} className="flex rounded p-2 mb-2 w-full">
<span>
Search entries by their repository URL <abbr title="regular expression">RegEx</abbr>.
</span>
Search entries by their repository URL <abbr title="regular expression">RegEx</abbr>.
Copy link
Contributor

Choose a reason for hiding this comment

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

thought: I agree, there's no need to double-encapsulate the contents. The alert component added by @mustard-mh back in https://github.com/gitpod-io/gitpod/pull/8783/files should already handle properly most, if not all, styling use cases, including dark theme colors. 🏓

</Alert>
<div className="flex flex-col space-y-2">
<div className="px-6 py-3 flex justify-between text-sm text-gray-400 border-t border-b border-gray-200 dark:border-gray-800 mb-2">
Expand Down Expand Up @@ -242,10 +240,10 @@ function AddBlockedRepositoryModal(p: AddBlockedRepositoryModalProps) {
]}
>
<Alert type={"warning"} closable={false} showIcon={true} className="flex rounded p-2 w-2/3 mb-2 w-full">
<span>Entries in this table have an immediate effect on all users. Please use it carefully.</span>
Entries in this table have an immediate effect on all users. Please use it carefully.
</Alert>
<Alert type={"message"} closable={false} showIcon={true} className="flex rounded p-2 w-2/3 mb-2 w-full">
<span>Repositories are blocked by matching their URL against this regular expression.</span>
Repositories are blocked by matching their URL against this regular expression.
</Alert>
<Details br={br} update={update} error={error} />
</Modal>
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/src/admin/WorkspacesSearch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export function WorkspaceSearch(props: Props) {
</div>
</div>
<Alert type={"info"} closable={false} showIcon={true} className="flex rounded p-2 mb-2 w-full">
<span>Search workspaces using workspace ID.</span>
Search workspaces using workspace ID.
Copy link
Contributor

Choose a reason for hiding this comment

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

praise: Thanks for all the side fixes here, Jan! 🍫

</Alert>
<div className="flex flex-col space-y-2">
<div className="px-6 py-3 flex justify-between text-sm text-gray-400 border-t border-b border-gray-200 dark:border-gray-800 mb-2">
Expand Down
2 changes: 1 addition & 1 deletion components/dashboard/src/components/ErrorMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function ErrorMessage(props: { imgSrc: string; imgAlt?: string; message: string
<>
<div className="mt-16 w-96">
<Alert closable={false} showIcon={true} type="error">
<span>{props.message}</span>
{props.message}
</Alert>
</div>
{isGitpodIo() && (
Expand Down
10 changes: 4 additions & 6 deletions components/dashboard/src/projects/Projects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,10 @@ export default function () {
{!team && (
<div className="app-container pt-2">
<Alert type={"message"} closable={false} showIcon={true} className="flex rounded mb-2 w-full">
<p>
We'll remove projects under personal accounts in Q1'2023.{" "}
<Link to="/new" className="gp-link">
Create a team.
</Link>
</p>
We'll remove projects under personal accounts in Q1'2023.{" "}
<Link to="/new" className="gp-link">
Create a team.
Copy link
Contributor

Choose a reason for hiding this comment

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

🅰️ Minor copy suggestion to follow the pattern of the help links.

Suggested change
Create a team.
Create a team

🅱️ Alternatively, or additionally, we could adopt this new evolving pattern with the → for internal links, see relevant comment in #13414 (comment).

Suggested change
Create a team.
Create a team

</Link>
</Alert>
</div>
)}
Expand Down