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

Focus the thread panel when clicking on an item in the TAC #12410

Merged
merged 9 commits into from
Apr 10, 2024

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Apr 9, 2024

actually the 'close' button in the threads panel as it's the only interactive element: we can improve this later when we use landmarks & generally have better a11y.

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • Sign-off given on the changes (see CONTRIBUTING.md).

actually the 'close' button in the threads panel as it's the only
interactive element: we can improve this later when we use landmarks
& generally have better a11y.
@dbkr dbkr added the T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems label Apr 9, 2024
as none of it is test3ed, it's not worth it.
@@ -298,7 +299,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
this.themeWatcher.start();
this.fontWatcher.start();

this.focusComposer = false;
this.focusNext = undefined;
Copy link
Member

Choose a reason for hiding this comment

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

This is the implicit value, do we really gain anything from this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nah, I guess not.

@dbkr dbkr added this pull request to the merge queue Apr 10, 2024
Merged via the queue into develop with commit 59395ab Apr 10, 2024
22 checks passed
@dbkr dbkr deleted the dbkr/focus_thread_panel branch April 10, 2024 13:34
MidhunSureshR added a commit that referenced this pull request Jul 8, 2024
See #12410

There's no longer a close button to focus so we instead focus the thread
tab. This is done in RightPaneltabs.tsx so we just need to remove this
code.
github-merge-queue bot pushed a commit that referenced this pull request Jul 9, 2024
* Create new method for header button behaviour

With the introduction of tabs, the behaviour of the header buttons is
changed as follows:
- Close any right panel if open
- Open the correct right panel if no panel was open before

The old method (and behaviour) is retained as showOrHidePhase.

* Implement tabs in the right panel

There are three tabs: Info, People and Threads

* Remove unwanted code from RoomSummaryCard

- Remove the menu item for opening the memberlist since that is now
  taken of by the tabs.
- Remove the close button

* Remove code for focusing close button from tac item

See #12410

There's no longer a close button to focus so we instead focus the thread
tab. This is done in RightPaneltabs.tsx so we just need to remove this
code.

* Introduce a room info icon to the header

This was previously present in the legacy room header but not in the new
header.

* BaseCard changes

- Adds id, ariaLabelledBy and role props to implement tab accessibility.
- Adds hideHeaderButtons prop to hide header buttons (think back and
  close buttons).
- Change confusing header rendering code:
  header is not rendered ONLY when no header is passed AND
  hideHeaderButtons is true.

* Refactor repeated code into function

Created a new function createSpaceScopeHeader which returns the
component if the room is a space room. Previously this code was
duplicated in every component that uses SpaceScopeHeader component.

* Pass BaseCard attributes and use helper function

Actually using the code from the last two commits

* Add, update and remove tests/screenshots/snapshots

* Fix distance between search bar and tabs

* Update compound

* Update screenshots/snapshots
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants