Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Fix clickable area of general event list summary toggle #8979

Merged
merged 5 commits into from
Jul 4, 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
11 changes: 4 additions & 7 deletions res/css/views/elements/_GenericEventListSummary.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,16 @@ limitations under the License.
}

.mx_GenericEventListSummary_toggle {
margin: 0 55px 0 5px;
margin-block: 0;
margin-inline-end: 55px;

&[aria-expanded=false] {
order: 9;
margin-inline-start: 5px;
}

&[aria-expanded=true] {
text-align: right;
margin-inline-start: auto; // reduce clickable area
}
}

Expand Down Expand Up @@ -109,11 +111,6 @@ limitations under the License.
cursor: pointer;
}

.mx_GenericEventListSummary_toggle {
color: $accent;
cursor: pointer;
}

.mx_GenericEventListSummary_line {
border-bottom: 1px solid $primary-hairline-color;
margin-left: 63px;
Expand Down
7 changes: 6 additions & 1 deletion src/components/views/elements/GenericEventListSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,12 @@ const GenericEventListSummary: React.FC<IProps> = ({
data-layout={layout}
data-testid={testId}
>
<AccessibleButton className="mx_GenericEventListSummary_toggle" onClick={toggleExpanded} aria-expanded={expanded}>
<AccessibleButton
kind="link_inline"
className="mx_GenericEventListSummary_toggle"
onClick={toggleExpanded}
aria-expanded={expanded}
>
{ expanded ? _t('collapse') : _t('expand') }
</AccessibleButton>
{ body }
Expand Down