-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$250] [Search v2.2] - Chats - Selected chat is hidden when navigating via keyboard #48902
Comments
Triggered auto assignment to @marcochavezf ( |
Triggered auto assignment to @isabelastisser ( |
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
|
Job added to Upwork: https://www.upwork.com/jobs/~021833559992291211111 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah ( |
@marcochavezf I am unable to reproduce this issue on latest main Screen.Recording.2024-09-10.at.10.59.35.PM.mov |
Edited by proposal-police: This proposal was edited at 2024-09-10 21:07:46 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.The element selected using the keyboard is outside the visible area. What is the root cause of that problem?In App/src/components/SelectionList/BaseSelectionList.tsx Lines 273 to 282 in 41e6968
scrollToLocation isn't functioning correctly due to variations in element sizes, caused by the offset in App/src/components/Search/index.tsx Lines 149 to 151 in a8b5914
to be the same as for Transactions. What changes do you think we should make in order to solve the problem?First, I would remove scrollToIndex from onFocusedIndexChange since I don’t see the point in keeping it (see optional). We can set a fixed height for all elements proof of concept: 2024-09-11.18-55-07.mp4What alternative solutions did you explore? (Optional)I propose removing code after: const [focusedIndex, setFocusedIndex] = useArrowKeyFocusManager({
initialFocusedIndex: flattenedSections.allOptions.findIndex((option) => option.keyForList === initiallyFocusedOptionKey),
maxIndex: Math.min(flattenedSections.allOptions.length - 1, CONST.MAX_SELECTION_LIST_PAGE_LENGTH * currentPage - 1),
disabledIndexes: disabledArrowKeyIndexes,
isActive: isFocused,
onFocusedIndexChange: () => {},
isFocused,
}); proof of concept: 2024-09-10.22-55-20.mp4 |
@rayane-djouah, are you still able to reproduce this? Thanks! |
I'm able to reproduce Screen.Recording.2024-09-11.at.11.48.46.PM.mov |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Reviewing now 👀 |
ProposalPlease re-state the problem that we are trying to solve in this issue.The issue occurs when the user navigates to the bottom of the chat list using the keyboard, the selected chat becomes hidden instead of staying visible What is the root cause of that problem?The root cause of this problem is related to the focus and scrolling behavior when using keyboard navigation in the chat list.
What changes do you think we should make in order to solve the problem?
const getItemLayout = (data, index) => ({
length: ITEM_HEIGHT,
offset: ITEM_HEIGHT * index,
index,
}); What alternative solutions did you explore? (Optional)An alternative approach could involve increasing the render window size of the list to ensure that more items are rendered and remain visible as the user navigates with the keyboard. However, this could lead to performance issues for long lists and is less optimal than ensuring the focus and scroll behavior work correctly. |
@rayane-djouah, can you please provide an update? Did you review all the proposals? Thanks! |
@Amoralchik Thanks for the proposal. It appears the main issue is that auto-scrolling to the active list element isn't functioning correctly due to the variations in list element height, which is not accurately reflected in the calculations. Is the problem linked to both the Regarding the proposed solution, setting a fixed height might not be ideal as it breaks the content, We need to ensure the full content of report actions is displayed. How might we dynamically determine the height of Regarding your optional solution: removing
|
@1subodhpathak I don't see a difference between your proposal and the later one. Additionally, please refrain from using overly wordy explanations; the changes you intend to make to fix the bug are not clear. Make sure to follow the guidelines in CONTRIBUTING.md when submitting proposals. |
Okay! marked your words @rayane-djouah |
@rayane-djouah Hi, How might we dynamically determine the height of ReportActionListItemType items? - I think (though I'm not sure, this is just a hypothesis) we could try creating a function that splits the text into Markdown from the HTML value, then gathers all the attributes and adds them to the block size. To make it clearer, here’s an example of what the code might look like:
I will try this approach, and if everything works well, I will update the proposal by/on Monday. Is the problem linked to both the getItemHeight function and the getItemLayout? - Yes App/src/components/SelectionList/BaseSelectionList.tsx Lines 172 to 174 in 41e6968
and then here: App/src/components/SelectionList/BaseSelectionList.tsx Lines 357 to 358 in 41e6968
Regarding your optional solution: removing scrollToIndex causes a regression - Oh I'm sorry, yeah that makes sense |
@isabelastisser We don't have a satisfactory proposal yet. |
Waiting on proposals |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@marcochavezf @isabelastisser @rayane-djouah this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
Waiting on proposals |
@marcochavezf, @isabelastisser, @rayane-djouah Huh... This is 4 days overdue. Who can take care of this? |
Waiting on proposals |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@isabelastisser Do we need to adjust the bounty for this issue to get more proposals? |
@rayane-djouah, we're keeping the original amount. Thanks! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Selected chat is hidden when navigating via keyboard What is the root cause of that problem?We are setting static
App/src/components/Search/index.tsx Lines 132 to 150 in 99f280b
We have incorrect item heights in the list with the same value of 76 for every item. When an item in the list is larger than 76 then only in that scenario we encounter this issue since it scrolls by considering every item's height as 76 and hence sometimes the selected item goes out of the view.
What changes do you think we should make in order to solve the problem?We should find out every item's original height and set the
To get the original height of each item we should first wrap the App/src/components/SelectionList/BaseSelectionList.tsx Lines 431 to 482 in 99f280b
to
where in
Now we will use this
to
We will also update the dependency of
Result (refer video below):result.mp4What alternative solutions did you explore? (Optional) |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.31-14
Reproducible in staging?: Y
Reproducible in production?: N/A
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Action Performed:
Precondition:
Expected Result:
The selected chat will be not hidden when navigating via keyboard.
Actual Result:
The selected chat is hidden when navigating via keyboard.
This issue happens with the chat at the bottom of the list.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6598844_1725981162147.20240910_230910.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @rayane-djouahThe text was updated successfully, but these errors were encountered: