-
Notifications
You must be signed in to change notification settings - Fork 48
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
Fix: issues rendering the number tab results #755
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! The query worked as expected, although I'm agree with Michael that would be nice if the result could be displayed without the need to reload the plage. That said, I also think that this could be improved later :)
I understand. We've handled similar implementations before, like with the Bulk Export feature. The new code uses the Action Scheduler to efficiently manage stores with a large number of orders. This method was chosen to avoid the drawbacks of using AJAX, particularly in larger stores. With AJAX, users would have to wait, and if they closed the tab, the script would stop running, leading to a poor user experience. By using the Action Scheduler, users can leave the page and come back later to view the results if the process takes too long. |
closes #752
This pull request aims to enhance the performance of the number tables query by caching the data in an option. This approach ensures that the data can be reused in subsequent requests, thus reducing the load on the store.
Additionally, I've introduced a new selector that allows for limiting the query results. This is particularly useful if there's a need to retrieve, for instance, only the most recent 100 numbers.
The implementation also includes functionality to track and display the last fetch date. This feature is instrumental in determining whether there's a need for a fresh fetch of data.
The cached data is designed to be deletable, ensuring flexibility and independence across different tables.
Furthermore, I've made minor stylistic adjustments to the table, especially within the
type
column. For unassigned numbers, the column now displaysgapped
. In the context ofcredit-note
tables, it also shows the refund order ID, enhancing clarity and information accessibility.The functionality for number filtering and search has been preserved.