-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 - Chat - You can't scroll the PDF right after opening it with the "down arrow" button #34816
Comments
Triggered auto assignment to @alexpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~011e97d8eae76876e6 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @situchan ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.You can't scroll the PDF right after opening it with the down or up buttons What is the root cause of that problem?the document is not focused after it's loaded What changes do you think we should make in order to solve the problem?we need to call the focus function in the setListAttributes this function is called in the outerRef of the ref.focus(); FYI as you can notice, the list component is shown after this loader indicator is removed POCScreen.Recording.2024-01-19.at.7.12.15.PM.mov |
ProposalPlease re-state the problem that we are trying to solve in this issue.Web - Chat - You can't scroll the PDF right after opening it with the "down arrow" button What is the root cause of that problem?After document is load success we don't focus to the document so we can't scroll it with the keyboard What changes do you think we should make in order to solve the problem?We will store the document ref and focus on it after document loaded success to avoid while document still loading user can click anywhere ST like download button...
this.setListAttributes = this.setListAttributes.bind(this);
+ this.pdfDocumentRef = React.createRef(null);
setListAttributes(ref) {
if (!ref) {
return;
}
+ this.pdfDocumentRef.current = ref;
...
}
onDocumentLoadSuccess(pdf) {
const {numPages} = pdf;
+ if(this.pdfDocumentRef.current && this.pdfDocumentRef.current.focus) {
+ this.pdfDocumentRef.current.focus();
+ }
...
} POC Screen.Recording.2024-01-20.at.01.31.12.movWhat alternative solutions did you explore? (Optional)Instead of storing ref at |
ProposalPlease re-state the problem that we are trying to solve in this issue.A newly opened PDF cannot be scrolled with keyboard without clicking on it first What is the root cause of that problem?No focus is being set on the document What changes do you think we should make in order to solve the problem?react-pdf has built in props to handle this. ( the currently used open source package )
I will test the focus on a password protected document as well to ensure there's no conflicts. What alternative solutions did you explore? (Optional)Alternatively, you can set your focus by creating your own refs in React. |
I don't think it is a bug, even in mac pdf preview and chrome pdf viewer you can't scroll without clicking on the pdf. |
@abzokhattab It didn't work for me without the timer and I set the duration randomly. It can be decreased if necessary. |
@abzokhattab you're right, calling |
I'll remove my proposal since it's redundant. |
@situchan - any update here regarding these proposals? |
reviewing |
My original.proposal is currenly hidden because my github account is currently suspended while it's being recovered. The proposal should be in an email history. The proposal was to use the react-pdf built in props to maintain focus ProposalPlease re-state the problem that we are trying to solve in this issue.PDFs opened in a new tab don't focus What is the root cause of that problem?This is not default behaviour, and must be coded for. What changes do you think we should make in order to solve the problem?We should leverage the react-pdf components and it's existing props to manage a focus callback on ready state of the document
What alternative solutions did you explore? (Optional) |
Sounds like a plan, keep us posted @situchan. Thanks! |
I think we should hold this for: |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Thanks, moving this to weekly and putting it on hold. |
Still holding |
Heads up, I will be offline until Tuesday, April 23, 2024, and will not actively watch over this GitHub during that period.If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks! |
@hungvu193 - catching up from being OOO, can we get an update on what's remaining here? Thanks! |
The PR was reverted since it was linked to a DB and we couldn't figure out the way to fix it. |
Got it, so is the issue still present, or did it self-resolve? Thanks! |
Unfortunately it's still present |
This comment was marked as outdated.
This comment was marked as outdated.
This week, I've been focused on Wave Collect resources so I'll start a discussion on Monday. |
Triggered auto assignment to @JmillsExpensify ( |
Heads up, I will be offline until Tuesday, May 28, 2024, and will not actively watch over this GitHub during that period.@JmillsExpensify— Next week, if the site is in a more stable spot, please start a discussion in the Open Source Slack room about whether we should find another solution here or close this GH. I waited to have that conversation since the focus has been on higher-priority issues, so I appreciate your help while I'm OOO. Thanks! Here is where we are at:
|
I think we should just close it. If someone is passionate, please raise a discussion in the Open Source Slack room and re-open when we've agreed on a solution. |
Since I and @abzokhattab already worked on the issue. Can we request a compensation here? @JmillsExpensify |
What do you think is reasonable? |
I think half of the bounty. |
That works for me, though in case anyone happens upon this decision in the future, it's a one-off and not indicative of how we'll approach cases like this in the future. In any case:
|
Contracts are paid out via Upwork. @abzokhattab also please check the message I sent you in Upwork, thanks! |
Alright thanks @JmillsExpensify .. i have refunded 250$ since i was already paid few days ago. please let me know if you have any other requests |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.28.0
Reproducible in staging?: Y
Reproducible in production?: Y
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Expected Result:
I should be able to use the arrows without clicking
Actual Result:
You can't scroll the PDF right after opening it with the "down arrow" button. You need to click once for the function to work
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6347791_1705680293652.bandicam_2024-01-19_13-44-51-560.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @JmillsExpensifyIssue Owner
Current Issue Owner: @JmillsExpensifyThe text was updated successfully, but these errors were encountered: