-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] Web - Private Note - Input is not focused after reloading the page. #27695
Comments
ProposalPlease re-state the problem that we are trying to solve in this issue.Dev: Web - Private notes - Delay in displaying the "Notes" field and "Save" button when refreshing the Private What is the root cause of that problem?We focus the input when the
What changes do you think we should make in order to solve the problem?We should use
What alternative solutions did you explore? (Optional)NA ResultScreencast.from.17-09-2023.21.17.33.webm |
Triggered auto assignment to @kadiealexander ( |
Bug0 Triage Checklist (Main S/O)
|
Job added to Upwork: https://www.upwork.com/jobs/~012866eed98442daeb |
Triggered auto assignment to @jliexpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
Proposal by: @hungvu193 ProposalPlease re-state the problem that we are trying to solve in this issue.Private Note - Input is not focused after reloading the page. What is the root cause of that problem?We're focusing the input after transition end, however while the page is reloading,
What changes do you think we should make in order to solve the problem?Incase ref={(el) => {
if (!el) {
return;
}
if (!privateNotesInput.current && didScreenTransitionEnd) {
focusAndUpdateMultilineInputRange(el);
}
privateNotesInput.current = el;
}} What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issueInput does not focus after reloading the page. What is the root cause of that problem?onEntryTransitionEnd and focusAndUpdateMultilineInputRange doesn't work correctly after reloading the page. What changes do you think we should make in order to solve the problem?We can add App/src/pages/PrivateNotes/PrivateNotesEditPage.js Lines 118 to 132 in c77814f
Screen.Recording.2023-09-18.at.18.34.23.movWhat alternative solutions did you explore? (Optional)NA |
ProposalPlease re-state the problem that we are trying to solve in this issue.Private Note - Input is not focused after reloading the page. What is the root cause of that problem?Currently we use onEntryTransitionEnd on Edit Note Page
Sometimes input ref is not yet set on the page load and then we get null ref here, So that input will be null and focus does not call and it returns early App/src/libs/focusAndUpdateMultilineInputRange.js Lines 13 to 17 in 6be8fca
What changes do you think we should make in order to solve the problem?We should follow this new approach for setting the focus on a load of the page, using the setTimeout and we should remove instead need to add this code on the PrivateNotesEditPage page const focusTimeoutRef = useRef(null);
useFocusEffect(useCallback(() => {
focusTimeoutRef.current = setTimeout(()=> focusAndUpdateMultilineInputRange(privateNotesInput.current), CONST.ANIMATED_TRANSITION);
return () => {
if (!focusTimeoutRef.current) {
return;
}
clearTimeout(focusTimeoutRef.current);
};
}, [])); Resultrefresh-edit-page.movWhat alternative solutions did you explore? (Optional)none |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Private Note - Input is not focused after reloading the page. What is the root cause of that problem?We had several issues like this which are raised because of the What changes do you think we should make in order to solve the problem?Since we changed our way of handling animations, so we should follow the same approach. We need to handle the focus for
pseudo code: useFocusEffect(
useCallback(() => {
if (!props.autoFocus || !input.current) return;
let focusTimeout;
if (props.shouldDelayFocus) {
focusTimeout = setTimeout(() => input.current.focus(), CONST.ANIMATED_TRANSITION);
return;
}
input.current.focus();
return () => {
if (!focusTimeout) {
return;
}
clearTimeout(focusTimeout);
};
}, [props, input]),
); What alternative solutions did you explore? (Optional)NA |
Unassigning myself as Kadie was the first assigned B0 member. |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
App/src/pages/ReportWelcomeMessagePage.js Lines 59 to 64 in e23c181
App/src/pages/ReportWelcomeMessagePage.js Line 66 in e23c181
App/src/pages/ReportWelcomeMessagePage.js Lines 85 to 95 in e23c181
What alternative solutions did you explore? (Optional)
|
@Ollyws could you please take a look at the proposals above? |
Bumped in Slack! |
Seems like this was already fixed by #27702 |
Agree. I couldn't reproduce as well |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@kadiealexander We're good to close this one as it's already been fixed, thanks. |
@Ollyws @kadiealexander 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! |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@Ollyws, @kadiealexander Huh... This is 4 days overdue. Who can take care of this? |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Input should be focused after reloading the page.
Actual Result:
Input is not focused after reloading the page.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.71.4
Reproducible in staging?: y
Reproducible in production?: new feature
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2023-09-17.at.11.27.44.mov
Recording.4575.mp4
Expensify/Expensify Issue URL:
Issue reported by: @hungvu193
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694924854779879
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: