This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 830
New context for local device verification #12417
Merged
richvdh
merged 3 commits into
develop
from
rav/historical_events/02_local_verified_context
Apr 16, 2024
Merged
New context for local device verification #12417
richvdh
merged 3 commits into
develop
from
rav/historical_events/02_local_verified_context
Apr 16, 2024
Conversation
This file contains 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
richvdh
added
the
T-Task
Refactoring, enabling or disabling functionality, other engineering tasks
label
Apr 12, 2024
richvdh
force-pushed
the
rav/historical_events/02_local_verified_context
branch
from
April 12, 2024 15:35
856b9d8
to
d082880
Compare
florianduros
approved these changes
Apr 15, 2024
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.
Looks good
Comment on lines
86
to
92
interface Props { | ||
/** Matrix client, which is exposed to all child components via {@link MatrixClientContext}. */ | ||
client: MatrixClient; | ||
|
||
/** Child components which will receive the contexts */ | ||
children: ReactNode; | ||
} |
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.
Suggested change
interface Props { | |
/** Matrix client, which is exposed to all child components via {@link MatrixClientContext}. */ | |
client: MatrixClient; | |
/** Child components which will receive the contexts */ | |
children: ReactNode; | |
} | |
interface Props extends PropsWithChildren<{ | |
/** Matrix client, which is exposed to all child components via {@link MatrixClientContext}. */ | |
client: MatrixClient; | |
}> |
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 suggestion! I've gone with something slightly different (removing children
from Props
, and using PropsWithChildren<Props>
at the reference site) which I think is in the spirit of your suggestion and follows conventions elsewhere in the code.
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.
We've decided we want to show some UTD errors differently depending on whether our device has been verified. That's fiddly, because determining if the device is verified is an async operation, and it can be updated independently of the events.
Rather than add state variables and event callbacks to every single UTD event tile, I want to expose this as a
Context
for use by all event tiles. This, therefore, is some enabling work to expose the verification status as a context.part of element-hq/element-meta#2313