Make shared-components tiles render identically outside Element Web - #4 (#33622)

* Use shared MessageTimestampView in edit history

* Move timestamp typography into shared component

* Updated snapshots

* Update comments after clean up

* Fixed sonar issue and added tests for improved coverage

* Fix Prettier issue

* Fix font-size on timestamps and toolbar button sizing

* Updated snapshots

* Updated Storybook screenshots

* Updated screenshots

* Clean up app/web unused/redundant styling for disambiguated profile

* Fix merge error

* Fixes after merge

* Fixes after merge
This commit is contained in:
rbondesson
2026-06-01 05:47:59 +00:00
committed by GitHub
parent 32b66747f4
commit fc23fcad47
16 changed files with 322 additions and 70 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

@@ -7,7 +7,7 @@
.content {
color: var(--cpd-color-text-secondary); /* override anchor color */
font-size: var(--cpd-font-size-body-xs);
font-size: 0.625rem; /* There is no Compound equivalent to $font-10px */
font-variant-numeric: tabular-nums;
display: inline-block;
white-space: nowrap;
@@ -53,7 +53,7 @@ export interface MessageTimestampViewActions {
* The view model for the message timestamp.
*
* Snapshot data describes timestamp content and rendering behavior, while
* container styling is supplied via component props.
* host layout and placement styling is supplied via component props.
*/
export type MessageTimestampViewModel = ViewModel<MessageTimestampViewSnapshot> & MessageTimestampViewActions;
@@ -74,11 +74,11 @@ interface MessageTimestampViewProps {
* The view model provides the timestamp values and display options. The component
* can render as a link when `href` is set, and can show both sent-at and received-at
* times in the tooltip when `tsReceivedAt` is provided. Use `className` for
* host-level styling.
* host-level layout and placement styling.
*
* @example
* ```tsx
* <MessageTimestampView vm={messageTimestampViewModel} className="mx_MessageTimestamp" />
* <MessageTimestampView vm={messageTimestampViewModel} />
* ```
*/
export function MessageTimestampView({ vm, className }: Readonly<MessageTimestampViewProps>): JSX.Element {