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

If multiple settings pages are opened at the same time when importing dictionaries the ui can duplicate #957

Open
Kuuuube opened this issue May 16, 2024 · 1 comment
Labels
kind/bug The issue or PR is regarding a bug triage/wontfix The issue or PR will not be worked on

Comments

@Kuuuube
Copy link
Member

Kuuuube commented May 16, 2024

Description

Upon importing a dictionary with multiple Yomitan settings tabs open in Firefox, the dictionaries in settings will duplicate in the UI. This is purely visual and does not break anything on the backend. Refreshing the page makes this go away.

To Reproduce:

  1. Open multiple settings pages. Easiest way to do this is open the settings page and copy past the url into other tabs.
  2. Import a dictionary

Appears to only affect Firefox. I was unable to reproduce this on Chromium.

This issue is caused by #930 and specifically the order of this logic in ext/js/pages/settings/dictionary-import-controller.js:

        const errors2 = await this._addDictionarySettings(result.sequenced, result.title);

        await this._settingsController.application.api.triggerDatabaseUpdated('dictionary', 'import');

However, if these are reversed to revert back to the previous behavior like this, it un-fixes #723, the (much more serious) issue being addressed in #930:

        void this._settingsController.application.api.triggerDatabaseUpdated('dictionary', 'import');

        const errors2 = await this._addDictionarySettings(result.sequenced, result.title);

Yomitan version
24.5.14.0

@Kuuuube Kuuuube added kind/bug The issue or PR is regarding a bug triage/wontfix The issue or PR will not be worked on labels May 16, 2024
@Kuuuube
Copy link
Member Author

Kuuuube commented May 16, 2024

Marking this as wontfix since it's a very niche bug with little consequence and likely quite a big pain to fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug The issue or PR is regarding a bug triage/wontfix The issue or PR will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant