-
-
Notifications
You must be signed in to change notification settings - Fork 827
Replace forceCount prop with hideIfDot #12344
Conversation
This replaces the `forceCount` prop on room badge components with `hideIfDot` which hopefully gives a better idea of what it does, since forceCount did not really force a count. Also remove the prop where it was just passing the default value anyway.
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.
Non-blocking:
Oops, I didn't submit my actual comment |
* If true, show nothing if the notification would only cause a dot to be shown rather than | ||
* a badge. That is: only display badges and not dots. Default: false. | ||
*/ | ||
hideIfDot?: boolean; |
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.
If it were me I would phrase this in the positive as showDot
, as I find that a little more comprehensible
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.
So the the reason I didn't go with this is that it would be something like, 'showIfDot', ie. whether to show the component if it would only be a dot. Having it as 'hide' felt more apparent that it was talking about hiding the component itself, rather than some part of the component? It is still, admittedly, a slightly weird option.
* Update `@vector-im/compound-design-tokens` in package.json (matrix-org#12339) * Change 'type' prop on badges to 'forceDot' (matrix-org#12327) * Change 'type' prop on badges tio 'forceDot' Which, hopefully, better represents what it actually does. Tidies up some of the logic. Split out from matrix-org#12254 * Missed a file * More comments * Oops, there is no count here. * Back out the logic refactor of StatelessNotificationBadge because it was also updating the logic for mark as unread badges and rewriting the ternary to the previous logic would be quite complex. * Fix doc comment Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * Clarify doc on displaying the count * Update doc for the forceDot param here too. --------- Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> * [Backport staging] Update `@vector-im/compound-design-tokens` in package.json (matrix-org#12340) (cherry picked from commit e3ba643) Co-authored-by: Florian Duros <florianduros@element.io> * Fix the image view (matrix-org#12341) * TAC: Fix hover state when expanded (matrix-org#12337) * Fix TAC hover state * Add playwright test * Update playwright snapshot after last compound style changes * v3.95.0-rc.0 * v3.95.0 * Reset matrix-js-sdk back to develop branch * TAC: Order rooms by most recent after notification level (matrix-org#12329) * Order room by thread timestamp * Fix key errors in test * Update jest snapshots * Update snapshots * Rename alpha/beta to numbers * Add playwright test * Replace forceCount prop with hideIfDot (matrix-org#12344) This replaces the `forceCount` prop on room badge components with `hideIfDot` which hopefully gives a better idea of what it does, since forceCount did not really force a count. Also remove the prop where it was just passing the default value anyway. --------- Co-authored-by: Florian Duros <florianduros@element.io> Co-authored-by: David Baker <dbkr@users.noreply.github.com> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Co-authored-by: ElementRobot <releases@riot.im> Co-authored-by: Robin <robin@robin.town>
This replaces the `forceCount` prop on room badge components with `hideIfDot` which hopefully gives a better idea of what it does, since forceCount did not really force a count. Also remove the prop where it was just passing the default value anyway.
This replaces the
forceCount
prop on room badge components withhideIfDot
which hopefully gives a better idea of what it does, since forceCount did not really force a count. Also remove the prop where it was just passing the default value anyway.This is mostly refactoring except for depending on the level of the notification rather then hasUnreadCount which is effectively the same thing currently, but will matter for Mark as Unread.
Split from https://github.com/matrix-org/matrix-react-sdk/pull/12254/files
Checklist
public
/exported
symbols have accurate TSDoc documentation.