Skip to content
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

Allow queueing dictionary update & delete together #1561

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

khaitruong922
Copy link

@khaitruong922 khaitruong922 commented Nov 4, 2024

Closes #1557
When enqueue a dictionary, hide its update button.

Also refactor dictionary update and delete behavior, only allow 1 queue to run at a time.
- If update queue is running then disable all delete buttons.
- If delete queue is running then hide all update buttons.

Comment on lines 1231 to 1234
/** @type {Promise<void>} */
const importPromise = new Promise((resolve) => {
this._settingsController.trigger('importDictionaryFromUrl', {url: downloadUrl, profilesDictionarySettings, onImportDone: resolve});
})
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the correct way to do this but this is the only way I can think of to await an event trigger.

@khaitruong922 khaitruong922 marked this pull request as ready for review November 5, 2024 04:48
@khaitruong922 khaitruong922 requested a review from a team as a code owner November 5, 2024 04:48
@khaitruong922 khaitruong922 changed the title Add dictionary update queue Allow queue dictionary update & delete together Nov 5, 2024
@khaitruong922
Copy link
Author

Ready for review.
Now allow queueing dictionary deletes and updates in the same task queue.

@khaitruong922 khaitruong922 changed the title Allow queue dictionary update & delete together Allow queueing dictionary update & delete together Nov 5, 2024
jamesmaa
jamesmaa previously approved these changes Nov 5, 2024
Copy link
Collaborator

@jamesmaa jamesmaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't test this but code looks sensible

@Kuuuube Kuuuube added kind/enhancement The issue or PR is a new feature or request area/ui-ux The issue or PR is related to UI/UX/Design labels Nov 6, 2024
Copy link

github-actions bot commented Nov 6, 2024

Playwright test results

passed  4 passed
flaky  1 flaky

Details

stats  5 tests across 4 suites
duration  2 minutes, 39 seconds
commit  7110544

Flaky tests

chromium › integration.spec.js › anki add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui-ux The issue or PR is related to UI/UX/Design kind/enhancement The issue or PR is a new feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dictionary update queue
3 participants