Closed rostyslavvnahornyi closed 9 months ago
Hi @rostyslavvnahornyi , thanks for this first attempt and it was a helpful learning experience to understand the complexities of pagination. This PR has some issues I wanted to share, and it may be advise-able to retry this task with a new strategy.
There are 2 goals that I am evaluating this on:
Against both goals this PR performs worse than prior: It delays the user by reloading data that has already been loaded, and it uses more bandwidth to retrieve scenes than before.
But the good news is I hopefully can help with a more clearly defined test case which I document below. I don't have an idea for a better strategy as pagination is complicated, so I wish you luck in finding a solution that works!
npm run start:dev
in 3dstreet-editor repo, log-in, note current bandwidth (transfer) level in network tools, click open button, scroll to the bottom of my scenes, then click community tab, scroll to bottom of all the scenes. Note bandwidth (transfer) level again.epic-v2-save-load
epic-v2-save-load
branchinfinity scroll via button
branchspecific usability issues:
Hi @rostyslavvnahornyi I am not sure why, but this works OK when using dev .env config but it does not work for production .env config (even running the same local code). See here for a video showing the issue: https://github.com/3DStreet/3dstreet-editor/assets/470477/7c3e6a9e-c84d-4e80-8f96-363787f5d047
Hi, @kfarr !
The issue was with the production configuration, so I added a new webpack production config. To start the production environment, use the following commands:
npm run start:build
npm run start:prod
With this configuration, the problem with infinite pagination is resolved in the production environment.
Here is an updated list of issues after this QA pass:
Uncaught (in promise) FirebaseError: Function where() called with invalid data. Unsupported field value: undefined
)Later tickets
[video1] video of a few issues: https://github.com/3DStreet/3dstreet-editor/assets/470477/d654634a-d728-4455-abcb-0742c20b6fe5
Hi, @kfarr!
We're currently facing an issue with pagination on the production environment due to the outdated webpack configuration. The old webpack configuration doesn't read environment variables, which is the root cause of the pagination problem.
The pagination is now functioning with the new webpack configuration. You can see it here
Previously, I had separated JS files in the dist directory to optimize the bundle. However, I realized there could be deployment issues, so I commented out the corresponding webpack plugin. As a result, we now have only one JS file in the dist directory.
I fixed the bug with the spinner in the unauthorized "My Scenes" tab.
I also reverted the changes back to "aframe-inspector-opened."
Regarding the "minor fixes" commit, I will provide more accurate commit names in the future. But for understanding this commit was related to resolving merge conflicts.
In conclusion, @kfarr, could you please review the firebase security rules for prod configuration and compare them with the dev environment? I suspect the main issue lies in the webpack configuration. If there are any problems with pagination on the production environment, we might need to adjust the webpack configuration for production. It seems that we don't encounter issues with the development configuration, but there are specific issues with the old production webpack configuration.
If you have any questions, I'll be glad to answer them!
@rostyslavvnahornyi good news and bad news:
This returns us to the 4 options I presented to Viktoria:
Hi @kfarr,
Could you please check the last commit? A more qualified engineer and I found a problem with pagination and we decided to solve it by changing from client pagination to server pagination. If you encounter any further issues with pagination, the probable cause might be related to the production configuration.
I hope this helps! Let me know if you have any more questions.
@rostyslavvnahornyi the new logic works as expected however there are many issues that were caused by changes unrelated to pagination that you were attempting in this PR. The changes may be valid but should not be in this PR.
Instead, please create a new PR with ONLY the changes related to this pagination ticket. Other deployment issues should be addressed through other tickets or PRs.
Hi @kfarr ,
Pagination is not working with the old configuration. The main issue in the production configuration is that it’s controlled and initiated by the “webpack dev server” package, which leads to errors.
I propose using a best practice approach, which involves separating the webpack configurations for development and production. This way, we can better manage the configurations.
You can see the problem demonstrated in this video.
@rostyslavvnahornyi I'm sorry to be annoyingly insistent upon this, and I'm not disputing your statement about deployment change being required, but please regardless split this in 2 clean PRs:
Hello @kfarr !
So, you can this PRs here feature/scenes-modal-pagination feature/webpack-prod
Thanks Rosty! Highly appreciated
On Thu, Nov 23, 2023 at 1:11 AM Rostyslav Nahornyi @.***> wrote:
Hello @kfarr https://github.com/kfarr !
So, you can this PRs here feature/scenes-modal-pagination https://github.com/3DStreet/3dstreet-editor/pull/347 feature/webpack-prod https://github.com/3DStreet/3dstreet-editor/pull/346
— Reply to this email directly, view it on GitHub https://github.com/3DStreet/3dstreet-editor/pull/320#issuecomment-1824035480, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADS3TMGQJNRTVGKIGTP7K3YF4HLFAVCNFSM6AAAAAA6PNUTDOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRUGAZTKNBYGA . You are receiving this because you were mentioned.Message ID: @.***>
confirmed this worked as expected split into 2 separate PRs, closing this combined one
https://github.com/3DStreet/3dstreet-editor/issues/304