Skip to content

fix: Updating the UX for hidden pages #40322

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
Apr 21, 2025
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
10 changes: 10 additions & 0 deletions app/client/packages/design-system/ads/src/List/List.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ export const StyledListItem = styled.div<{
background-color: var(--ads-v2-colors-content-surface-default-bg);
}

&[data-subtle="true"] {
.t--entity-name {
color: var(--ads-v2-color-fg-subtle);
}

.ads-v2-icon {
color: var(--ads-v2-color-fg-subtle);
}
}

&:hover {
background-color: var(--ads-v2-colors-content-surface-hover-bg);
}
Expand Down
1 change: 1 addition & 0 deletions app/client/packages/design-system/ads/src/List/List.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ function ListItem(props: ListItemProps) {
data-isblockdescription={isBlockDescription}
data-rightcontrolvisibility={rightControlVisibility}
data-selected={props.isSelected}
data-subtle={props.isSubtle || false}
data-testid={props.dataTestId}
id={props.id}
onClick={handleOnClick}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export interface ListItemProps {
onDoubleClick?: () => void;
/** Whether the list item is disabled. */
isDisabled?: boolean;
/** Whether the list item should be subtle styled, but not disabled. */
isSubtle?: boolean;
/** Whether the list item is selected. */
isSelected?: boolean;
/** The size of the list item. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ export const PageEntity = ({
<EntityItem
className={`page fullWidth ${isCurrentPage && "activePage"}`}
id={page.pageId}
isDisabled={page.isHidden}
isSelected={isCurrentPage}
isSubtle={page.isHidden}
key={page.pageId}
nameEditorConfig={nameEditorConfig}
onClick={!isCurrentPage ? switchPage : noop}
Expand Down
Loading