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: url change without window load on npm #116

Merged
merged 33 commits into from
Jun 19, 2023

Conversation

rzarviv
Copy link
Contributor

@rzarviv rzarviv commented Jun 15, 2023

  • created a new event: EVENT_URL_CHANGED that notifies content script on URL change
  • added a utility function :waitForElement that fires an action after a specified element is created
  • added tests

close #107

rzarviv and others added 27 commits June 5, 2023 16:05
-  encoded the package name to ensure the link will open properly
…g the search bar

- created a new event: EVENT_URL_CHANGE to notify content script on url change
- moved event handler of URL_CHANGED to `content-events.js`
- added a new subscription method for url change in `content.js`
…tener.

- changed page locator in test.
- used a MutationObserver to insert `overlay-package-report` after the repository element is rendered (there are cases that the repository selector cannot be found since it's not yet rendered).
- added utility function that waits for element to be rendered
- rewrote test
- added utility function that waits for element to be rendered
- rewrote test
Added a discord notification workflow.
The file added was used for testing purposes, and if anyone else would
want to test it.
It may also be used to split up the notifying workflow from the other
build and publish workflow, and I guess more platform notifications will
be added overtime, but it is up to you.

The notification content is: 
![Screenshot 2023-06-12 at 16 52
05](https://github.com/os-scar/overlay/assets/62609377/1c2b4e94-232a-4eab-8ecb-6e8e49b54fab)


**when creating the Discord webhook you can choose the name of the bot

---------

Co-authored-by: Baruch Odem (Rothkoff) <baruchiro@gmail.com>
organize imports

- changed "chrome" to "browser"  in background-events.js

- added "tabs" permission to firefox manifest
- moved event handler of URL_CHANGED to `content-events.js`
- added a new subscription method for url change in `content.js`

- added a test for issue os-scar#107

- moved EVENT_URL_CHANGED's event handler to the already existing listener.
- changed page locator in test.
- used a MutationObserver to insert `overlay-package-report` after the repository element is rendered (there are cases that the repository selector cannot be found since it's not yet rendered).

- fixed test

lint e2e too

- removed "highlight" and fixed test

- removed `tabs` permission from manifest
- added utility function that waits for element to be rendered
- rewrote test

ci: add discord notification (os-scar#108)

Added a discord notification workflow.
The file added was used for testing purposes, and if anyone else would
want to test it.
It may also be used to split up the notifying workflow from the other
build and publish workflow, and I guess more platform notifications will
be added overtime, but it is up to you.

The notification content is:
![Screenshot 2023-06-12 at 16 52
05](https://github.com/os-scar/overlay/assets/62609377/1c2b4e94-232a-4eab-8ecb-6e8e49b54fab)

**when creating the Discord webhook you can choose the name of the bot

---------

Co-authored-by: Baruch Odem (Rothkoff) <baruchiro@gmail.com>

fix real examples

lint e2e too

- removed "highlight" and fixed test

ci: add discord notification (os-scar#108)

Added a discord notification workflow.
The file added was used for testing purposes, and if anyone else would
want to test it.
It may also be used to split up the notifying workflow from the other
build and publish workflow, and I guess more platform notifications will
be added overtime, but it is up to you.

The notification content is:
![Screenshot 2023-06-12 at 16 52
05](https://github.com/os-scar/overlay/assets/62609377/1c2b4e94-232a-4eab-8ecb-6e8e49b54fab)

**when creating the Discord webhook you can choose the name of the bot

---------

Co-authored-by: Baruch Odem (Rothkoff) <baruchiro@gmail.com>

fix real examples

- fixed typo
@rzarviv rzarviv changed the title Fix npm search update fix: npm search update Jun 15, 2023
@rzarviv rzarviv marked this pull request as ready for review June 15, 2023 10:54
@baruchiro baruchiro changed the title fix: npm search update fix: url change without window load on npm Jun 18, 2023
Copy link
Collaborator

@baruchiro baruchiro left a comment

Choose a reason for hiding this comment

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

I accept this approach.

src/content/content-events.js Outdated Show resolved Hide resolved
src/background/background-events.js Outdated Show resolved Hide resolved
@baruchiro baruchiro merged commit c92f8e0 into os-scar:master Jun 19, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Desired behavior of Overlay extension when using the search bar in npmjs.com
3 participants