This repository was archived by the owner on Sep 11, 2024. It is now read-only.
Replace forceCount prop with hideIfDot - #12344
Merged
Merged
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.
dbkr
marked this pull request as ready for review
March 14, 2024 19:50
Member
|
Oops, I didn't submit my actual comment |
robintown
reviewed
Mar 14, 2024
| * 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; |
Member
There was a problem hiding this comment.
If it were me I would phrase this in the positive as showDot, as I find that a little more comprehensible
Member
Author
There was a problem hiding this comment.
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.
thoraj
added a commit
to verji/matrix-react-sdk
that referenced
this pull request
Mar 15, 2024
* 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>
andybalaam
pushed a commit
that referenced
this pull request
Mar 18, 2024
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces the
forceCountprop on room badge components withhideIfDotwhich 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/exportedsymbols have accurate TSDoc documentation.