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

Use AccessibleButton for 'In reply to' link button on ReplyChain #8726

Merged
merged 1 commit into from
May 31, 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
17 changes: 8 additions & 9 deletions res/css/views/elements/_ReplyChain.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@ limitations under the License.
*/

.mx_ReplyChain {
margin-top: 0;
margin-left: 0;
margin-right: 0;
margin-bottom: 8px;
padding: 0 10px;
margin: 0 0 $spacing-8 0;
padding: 0 10px; // TODO: Use a spacing variable
border-left: 2px solid $accent;
border-radius: 2px;

.mx_ReplyChain_show {
@mixin ButtonResetDefault;
color: inherit;
&.mx_AccessibleButton_kind_link_inline {
padding: 0;
color: unset;

&:hover {
color: $links;
&:hover {
color: $links;
}
}
}

Expand Down
10 changes: 7 additions & 3 deletions src/components/views/elements/ReplyChain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { Action } from "../../../dispatcher/actions";
import Spinner from './Spinner';
import ReplyTile from "../rooms/ReplyTile";
import Pill, { PillType } from './Pill';
import { ButtonEvent } from './AccessibleButton';
import AccessibleButton, { ButtonEvent } from './AccessibleButton';
import { getParentEventId, shouldDisplayReply } from '../../../utils/Reply';
import RoomContext from "../../../contexts/RoomContext";
import { MatrixClientPeg } from '../../../MatrixClientPeg';
Expand Down Expand Up @@ -217,9 +217,13 @@ export default class ReplyChain extends React.Component<IProps, IState> {
{
_t('<a>In reply to</a> <pill>', {}, {
'a': (sub) => (
<button onClick={this.onQuoteClick} className="mx_ReplyChain_show">
<AccessibleButton
kind="link_inline"
className="mx_ReplyChain_show"
onClick={this.onQuoteClick}
>
{ sub }
</button>
</AccessibleButton>
),
'pill': (
<Pill
Expand Down