zulip-flutter
zulip-flutter copied to clipboard
semantics: Fix content navigation order in message content when links present
Fixes #1963.
Displaying Semantic widget tree by wrapping the required widget with SemanticDebugger .
Possible Cause: Flutter Automatically rearranging the semantics nodes in wrong order?
Changes Displayed using SemanticsDebugger widget(Updated)
### Clearly the Semantic Widget Tree is cleaned and is in proper order after incorporating the changes.
| Before(Turned Off Debugger) | Before(Turned On Debugger) | After(Turned On Debugger) |
|---|---|---|
Changes Done And their respective significance:
-
Added 'Semantic' Widget over the Columns of message content to make sure the flutter does not reorder them as per its wish and provide them as isolated semantics in same order as they are placed in widget tree.
-
Added 'MergeSemantics' Widget over the
InheritedMessageto merge semantic nodes in the same order as they were given i.e after isolating them they were passed in the same order as that of the widget tree. -
Added 'MergeSemantics' in
MessageWithPossibleSenderto make sure when the user click the message box, i.e. click even the avatar of message receipt it should read the message of the user, not just the user name and the time it was sent at(Before the changes implemented in this PR it used to do that!). This implementation was taken from WhatsApp where a similar behavior was observed that even clicking the avatar of the message receipt activated the whole message to be talked aloud instead of just the receipt name and time it was sent at.