-
-
Notifications
You must be signed in to change notification settings - Fork 833
Add jump to date functionality to date headers in timeline v2 #7339
Add jump to date functionality to date headers in timeline v2 #7339
Conversation
New TooltipTarget & TextWithTooltip were not roving-accessible
…use useRovingTabIndex
1. Only can tab to the datepicker input and "Go" when the "Jump to date" option is selected 1. Tabbing off the end of the ContextMenu will close it and return your focus back to where it is on the page. Note: nothing special coded for this, just prevented from tabbing off the end of the ContextMenu which was the end of the page. 1. Can navigate up and down the ContextMenu with Arrow keys as expected
❤️ |
… t3chguy/a11y2 � Conflicts: � src/components/views/rooms/EventTile.tsx
See #7339 (comment) We also added `:not(.mx_AccessibleButton_hasKind)` to the `res/css/views/context_menus/_IconizedContextMenu.scss` selectors so the style that was overriding this before is no longer interferring.
…s-in-timeline-v2 Conflicts: src/i18n/strings/en_EN.json
onDatePicked?: (dateString: string) => void; | ||
} | ||
|
||
const JumpToDatePicker: React.FC<IProps> = ({ ts, onDatePicked }: IProps) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the review pass @turt2live 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm minus component naming
…s-in-timeline-v2 Conflicts: src/components/views/rooms/SearchResultTile.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks :)
Thanks for the review @turt2live 🐇 |
@MadLittleMods did this still need design review? |
@turt2live It's using the standard context menu styles so it's probably pretty good to go. The only thing non-standard is the jump to date calendar form area which we can always iterate in another PR if needed. Plus this is also behind a Labs flag so it doesn't really need to be held up by anything. |
@MadLittleMods this caused all context menus to increase in size so definitely should've had design review |
Fix element-hq/element-web#20801 Regressed in #7339 Relevant styles were first added in #4858 (context behind why the original styles were added)
Fix element-hq/element-web#20801 Regressed in #7339 Relevant styles were first added in #4858 (context behind why the original styles were added) --- ## Cause Battling CSS specificity between the default and compact styles, https://specificity.keegan.st/ Known good (On `app.element.io` (expected)): ```css // 0 3 0 .mx_IconizedContextMenu .mx_IconizedContextMenu_optionList .mx_AccessibleButton { padding-top: 12px; padding-bottom: 12px; } // Compact styles override our default rules because they come // after the other styles (source order) and have the same specificity // 0 3 0 .mx_IconizedContextMenu.mx_IconizedContextMenu_compact .mx_IconizedContextMenu_optionList > * { padding: 8px 16px 8px 11px; } ``` Bad (On `develop` (broken)): ```css // Default rules always override because they have higher specificity. // The `:not()` selector doesn't add any extra specificity but the selectors inside the `:not(...)` do. // 0 4 0 .mx_IconizedContextMenu .mx_IconizedContextMenu_optionList .mx_AccessibleButton:not(.mx_AccessibleButton_hasKind) { padding-top: 12px; padding-bottom: 12px; } // 0 3 0 .mx_IconizedContextMenu.mx_IconizedContextMenu_compact .mx_IconizedContextMenu_optionList > * { padding: 8px 16px 8px 11px; } ```
v1 in #7317
Add jump to date functionality to date headers in timeline
Relies on this
matrix-js-sdk
PR to add MSC3030/timestamp_to_event
support: matrix-org/matrix-js-sdk#2072Fix element-hq/element-web#7677
Part of MSC3030: matrix-org/matrix-spec-proposals#3030
Experimental Synapse implementation added in matrix-org/synapse#9445
Testing strategy
homeserver.yaml
to enable themsc3030_enabled
experimental featureJump to date
Labs featureDev notes
Screen recordings:
Combining React callback refs and ref-refs,
TODO
MenuItems
, Add jump to date functionality to date headers in timeline v2 #7339 (comment)ContextMenu
RovingTabIndex
refactor to another PR, RefactorContextMenu
to useRovingTabIndex
(more consistent keyboard navigation accessibility) #7353/jumptodate 2021-12-10
, Add/jumptodate
slash command #7372This PR currently has no changelog labels, so will not be included in changelogs.
A reviewer can add one of:
T-Deprecation
,T-Enhancement
,T-Defect
,T-Task
to indicate what type of change this is, or addType: [enhancement/defect/task]
to the description and I'll add them for you.Preview: https://61f2350539af3b54bfe30e9a--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.