Skip to content

fix: better styling for disabled items #2014

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 3 commits into from
Oct 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 0 additions & 4 deletions frontend/amundsen_application/static/css/_list-group.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,5 @@
cursor: pointer;
z-index: 1;
}

&.is-disabled {
pointer-events: none;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const TableListItem: React.FC<TableListItemProps> = ({
tableHighlights,
disabled,
}) => (
<li className={`list-group-item ${disabled ? 'is-disabled' : 'clickable'}`}>
<li className="list-group-item">
<Link
className="resource-list-item table-list-item"
className={`resource-list-item table-list-item ${disabled ? 'is-disabled' : 'clickable'}`}
to={getLink(table, logging)}
onClick={(e) =>
logClick(e, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ $resource-item-height: 110px;
padding: $spacer-3;
text-decoration: none;

&.is-disabled {
pointer-events: none;
cursor: not-allowed;
.resource-icon {
filter: grayscale(80%);
Copy link
Member

Choose a reason for hiding this comment

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

Hmmm... Can you tell me more about why we use this? It is a non-conventional way.

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 needed to add some sort of visual indicator that the table item is not actionable (won't go to a table page), and it felt like just the table name being gray was not enough. There is a ss showing what it looks like. Is there a better way of doing this?

}
.resource-info .resource-info-text .resource-name {
Copy link
Member

Choose a reason for hiding this comment

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

Would this work with just '.resource-name'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it doesn't I tried to use a less specific one and the purple styling kept coming through

color: $text-secondary;
}
}

.description {
em {
background-color: $indigo10;
Expand Down