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

Fix: theme toggle each time content script is loaded #835

Conversation

tr4cks
Copy link
Contributor

@tr4cks tr4cks commented Jan 23, 2025

* denotes required fields

Priority*

  • High: This PR needs to be merged first, before other tasks.
  • Medium: This PR should be merged quickly to prevent conflicts due to common changes. (default)
  • Low: This PR does not affect other tasks, so it can be merged later.

Purpose of the PR*

Make sure the theme doesn't change every time the content script is loaded into a page. This can be a bit confusing the first time you test the project.

Changes*

I removed the toggleTheme() function in the content script and the dependency in package.json. I added an external function to still show an example of how to define functions in an external module.

How to check the feature

Open the extension's side panel and then search in the browser's search bar. The theme no longer changes every time you change pages (when the content script is loaded).

@tr4cks tr4cks requested a review from Jonghakseo as a code owner January 23, 2025 16:48
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. We will check and reply to you as soon as possible.

@PatrykKuniczak
Copy link
Collaborator

@tr4cks You've forgoten to run pnpm i after you've removed '@extension/storage' from package.json let's run it and commit pnpm-lock.json file

@PatrykKuniczak PatrykKuniczak force-pushed the fix-theme-toggle-each-time-script-is-loaded branch from cf092f8 to 1213268 Compare January 26, 2025 12:56
@tr4cks
Copy link
Contributor Author

tr4cks commented Jan 28, 2025

is it normal that the update also affected another line?

From:

expect-webdriverio: 5.0.2(@wdio/globals@9.4.5(@wdio/logger@9.1.0))(@wdio/logger@9.4.4)(webdriverio@9.4.5)

To:

expect-webdriverio: 5.0.2(@wdio/globals@9.4.5(@wdio/logger@9.4.4))(@wdio/logger@9.4.4)(webdriverio@9.4.5)

Other lines have been modified, but they also concern the same thing.

Let me know if I leave it the way it was or update that too.

Thanks

@PatrykKuniczak
Copy link
Collaborator

@tr4cks Probably it have ^ in version inside this package, and on package change pnpm pull latests version with minor changes , that's why it change.

I'm not very sure about that, but that's probably it, but after all, run pnpm i and push --force-with-lease here :)

@tr4cks tr4cks force-pushed the fix-theme-toggle-each-time-script-is-loaded branch from 1213268 to 39a7e4e Compare January 29, 2025 09:57
@PatrykKuniczak PatrykKuniczak force-pushed the fix-theme-toggle-each-time-script-is-loaded branch from 39a7e4e to 6b3549c Compare January 29, 2025 12:26
@PatrykKuniczak PatrykKuniczak enabled auto-merge (squash) January 29, 2025 12:28
Copy link
Collaborator

@PatrykKuniczak PatrykKuniczak left a comment

Choose a reason for hiding this comment

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

LGTM

@PatrykKuniczak PatrykKuniczak merged commit 7ea92e0 into Jonghakseo:main Jan 29, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants