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

Enhancement: Add context provider to sidebar #498

Merged
merged 42 commits into from
Apr 4, 2024

Conversation

mayan-000
Copy link
Collaborator

@mayan-000 mayan-000 commented Feb 16, 2024

Description

This PR adds code to introduce context provider in useSidebar hook.

Relevant Technical Choices

  • Removes prop-drilling using the sidebar context selector to extract and update data.
  • Updates sidebar type,
    • Now elements are not stored in state, but callbacks are stored, rendering the JSX.

Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

Fixes #505

@mayan-000 mayan-000 changed the base branch from develop to ref/move-context-selector February 16, 2024 05:57
@mayan-000 mayan-000 added this to the v0.6.0 milestone Feb 16, 2024
@mayan-000 mayan-000 self-assigned this Feb 16, 2024
@mayan-000 mayan-000 changed the title Refactor: Add context provider to sidebar Enhancement: Add context provider to sidebar Feb 16, 2024
commit bc7ce7d
Merge: 4e510b2 59622d0
Author: Amoghavarsha Kudaligi <kgamoghavarsha@gmail.com>
Date:   Tue Feb 20 20:19:35 2024 +0530

    Merge branch 'develop' of github.com:GoogleChromeLabs/ps-analysis-tool into develop

commit 4e510b2
Author: Amoghavarsha Kudaligi <kgamoghavarsha@gmail.com>
Date:   Tue Feb 20 20:19:13 2024 +0530

    Fix the reload button staying on the popup.

commit 59622d0
Author: nirwalayush <coding.carrots@gmail.com>
Date:   Tue Feb 20 20:14:51 2024 +0530

    fix: fix details panel showing unknown reason message

commit 809bc38
Author: Amoghavarsha Kudaligi <kgamoghavarsha@gmail.com>
Date:   Tue Feb 20 18:27:30 2024 +0530

    Add <br/> for uniformity.
    Remove top padding from blocking direction.

commit 27242be
Author: Mayank Rana <mayankranax1@gmail.com>
Date:   Tue Feb 20 17:50:11 2024 +0530

    fix: add flags to not highlight rows

commit 3847489
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Tue Feb 20 16:04:36 2024 +0530

    Run audit fix

commit 35af0b4
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Tue Feb 20 16:04:06 2024 +0530

    Bump version

commit 7c74c6a
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Tue Feb 20 16:02:07 2024 +0530

    Update rws data

commit 89378d6
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Tue Feb 20 16:01:45 2024 +0530

    Update cookie database

commit 595f1a7
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Tue Feb 20 16:00:14 2024 +0530

    Update changelog

commit ed0823d
Author: Ayush Nirwal <53055971+ayushnirwal@users.noreply.github.com>
Date:   Tue Feb 20 15:48:21 2024 +0530

    style-fix: scale up prefix icons in table (#514)

commit 0ad08a3
Author: Mohammad Taqui Sayed <6297436+mohdsayed@users.noreply.github.com>
Date:   Tue Feb 20 15:42:20 2024 +0530

    Add UTM params to outgoing links (#512)

    * Add utility function and its test case adding utm params

    * Move util function to common

    * Make util function to handle # URLs and use for latest news and quick links

    * Add UTM links to faciliated testing

    * Update test for dev doc

    * Update link to file issue

    * Remove param from github.com

    * Add utm params to more links

    * Add utm params to all help urls

    * Add utm params to youtube as well

    * Fix tests

commit 9fad900
Author: Kudaligi Amoghavarsha <kgamoghavarsha@gmail.com>
Date:   Tue Feb 20 15:41:44 2024 +0530

    Fix: keep service worker alive (#513)

    * Keep service worker alive once it is profile is started.

    * Add peroidic intervals to send data to devtools and popup for old profile.

    * Remove addition of interval on windows creation.

    * Keep setInverval in the chrome.windows.onCreated.

commit bd1624b
Author: Kudaligi Amoghavarsha <kgamoghavarsha@gmail.com>
Date:   Tue Feb 20 13:23:02 2024 +0530

    Remove relative property. (#511)

    Change messageing for toast message.

commit 7794a22
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Tue Feb 20 10:01:04 2024 +0530

    Chore: Remove logs used for debugging empty cookies

commit 789a40a
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Tue Feb 20 09:58:10 2024 +0530

    Fix popup ui issue

commit dd1b286
Author: Mayank Rana <58820001+mayan-000@users.noreply.github.com>
Date:   Mon Feb 19 20:28:19 2024 +0530

    Enhancement: Update cookie's blocking status enum and UI (#507)

    * ref: add enums for blocking status

    * fix: update deriveBlocking utils

    * feat: add icons and the extractors

    * feat: conditionally render icons

    * test-fix: update deriveBlockingStatus test

    * fix: don't hightlight rows when not using CDP

    * ref: update comment

    * fix: decrease padding

    * fix:manage expiring cookies

    ---------

    Co-authored-by: nirwalayush <coding.carrots@gmail.com>
    Co-authored-by: sayedtaqui <sayedwp@gmail.com>

commit 4fea486
Author: Kudaligi Amoghavarsha <kgamoghavarsha@gmail.com>
Date:   Mon Feb 19 18:20:30 2024 +0530

    Two-step process for toggling CDP state (#494)

    * Add a toast message component in design-system.
    Add mechanism in place to reload all the tabs.
    Add mechanism to show the reload button in the devtools.

    * Add toast message in the popup.

    * Persist toastmessage on reload of extension

    * Add styling to toast message

    * Add a button to match the chrome://flags toast-message.

    * Add a button to the popup.

    * Fix the order of firing of events.

    * Reduce Padding.

    * Reduce vertical padding.

    * Fix the text and add toast message in popup.

    * Add fullstop to the popup messaging.

    * Shorten the devtools message.

    * Remove persistence of the toastMessage

    * use sessionStorage instead of localStorage from web api

    * Fix refresh of the cookies.

    * revert changes.

    * Fix component showing analyse this tab on newtab open.

    * Fix service worker popup connection.

    * Fix the messaging.

    * Fix value being set add new state for display.

    * Fix 0 cookies landing page on multitab debugging issue.

    * Fix padding and the design.

    * Add breakpoints for the button.
    Add breakpoints for text.

    * Fix the fontsize

    * Fix breakpoints

    * Fix text for button.

    * Fix message not showing up in popup.

    * Add comment to listener.
    Add default case to switch block.

    * ref: use absolute to spread toast message

    * Fix the toastmessage while scrolling.

    ---------

    Co-authored-by: Mayank Rana <mayankranax1@gmail.com>

commit f7c4774
Author: Mayank Rana <58820001+mayan-000@users.noreply.github.com>
Date:   Mon Feb 19 17:48:22 2024 +0530

    Refactor: Restructure `Facilitated Testing` landing page UI (#493)

    * add timeline icon

    * ref: restructure UI replicating infocard one

    * ref: update landing page width

    * styles: add breakpoints for bigger screens

    * ref: update the order

commit f7757ad
Author: Mohammad Taqui Sayed <6297436+mohdsayed@users.noreply.github.com>
Date:   Mon Feb 19 17:45:02 2024 +0530

    Fix: Library detection miscellaneous QA issues (#495)

    * Add GIS_EXCEPTIONS and GSIv2_EXCEPTIONS which remove the given feature from UI

    * Review comments address - Developer Testing Pending

    * Add Testcases for filterMatchesBasedOnExceptions

    * Update load delay to 2 sec and show page loading text when page is loading

    * Fix issue where when all signatures are filtered empty state wasnt showing properly

    ---------

    Co-authored-by: Manoj Mohan <jesuismanoj@gmail.com>

commit 84d62ac
Merge: c0ba3b5 88761db
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Fri Feb 16 21:31:14 2024 +0530

    Merge branch 'develop' of github.com:GoogleChromeLabs/ps-analysis-tool into develop

commit c0ba3b5
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Fri Feb 16 21:29:26 2024 +0530

    Add one more log

commit 88761db
Author: Ayush Nirwal <53055971+ayushnirwal@users.noreply.github.com>
Date:   Fri Feb 16 13:26:08 2024 +0530

    Fix: add conditional rendering in technology details panel (#499)

    * feat:add conditional rendering in technology details panel

    * fix: add message for no description available.

commit 1f93d3a
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Thu Feb 15 19:34:41 2024 +0530

    Temp: Add logs for debugging
Base automatically changed from ref/move-context-selector to develop February 25, 2024 16:17
commit a80cde2
Author: Mayank Rana <58820001+mayan-000@users.noreply.github.com>
Date:   Thu Feb 29 13:02:20 2024 +0530

    Enhancement: Add context provider to table (#485)

    * use state and effect instead of memo

    * Squashed commit of the following:

    commit 7352757
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Thu Feb 8 13:51:59 2024 +0530

        ref: replace useMemo with state

    commit b690c6b
    Merge: 1e4f862 bdfb3a1
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Thu Feb 8 11:41:58 2024 +0530

        Merge branch 'develop' into ref/optimize-table

    commit 1e4f862
    Merge: 1f52d88 d5fa3ae
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Wed Feb 7 17:30:25 2024 +0530

        Merge branch 'develop' into ref/optimize-table

    commit 1f52d88
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Wed Feb 7 15:39:35 2024 +0530

        fix: handle click on parent

    commit 9ba692e
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Wed Feb 7 14:23:01 2024 +0530

        ref: calculate flags inside the component

    commit 2685a69
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Tue Feb 6 23:03:38 2024 +0530

        ref: move code to utils

    commit 42c224f
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Tue Feb 6 21:37:43 2024 +0530

        chore: use optional chain

    commit c8b842d
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Tue Feb 6 21:28:03 2024 +0530

        ref: handle vertical bar condition from outside component

    commit c488bc3
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Tue Feb 6 19:00:25 2024 +0530

        ref: allow adding of styles conditionally to table row from outside component

    commit 59772dd
    Merge: f7417df 0f05f4f
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Tue Feb 6 16:57:33 2024 +0530

        Merge branch 'develop' into test/optimize-table

    commit f7417df
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Tue Feb 6 15:33:04 2024 +0530

        ref: pass callbacks into provider and remove from props

    commit 5ee9e48
    Merge: 8598f2f d051f50
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Mon Feb 5 12:32:18 2024 +0530

        Merge branch 'develop' into test/optimize-table

    commit 8598f2f
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Mon Feb 5 11:56:00 2024 +0530

        enhancement: implement useContextSelector for table hook

    commit facaec2
    Author: Mayank Rana <mayankranax1@gmail.com>
    Date:   Thu Feb 1 18:21:58 2024 +0530

        use state and effect instead of memo

    * test: update testcases

    * ref: use callbacks to render elements and not store in state

    * ref: update table in technologies table

    * ref: use callback to render extra interface in table top bar

    * fix: use callback for extracting classes

    * fix: add prop tp not export table in dashboard

    * fix: move index based styles to component

    * enhancement: allow tailwind styles from ts files

    * test: update testcases

    * test: not passing empty string for cell

    * test: remove skip from filters test

    * ref: break useTable context store to smaller files and update imports

    * ref: update var name

    * Add todo comment

    * ref: update props default values and remove comments

    * test: change import

    * ref: update context imports

commit b941784
Merge: 2eb6715 a38b3b2
Author: sayedtaqui <sayedwp@gmail.com>
Date:   Wed Feb 28 01:34:46 2024 +0530

    Merge branch 'main' of github.com:GoogleChromeLabs/ps-analysis-tool into develop

commit a38b3b2
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Wed Feb 28 00:52:40 2024 +0530

    Chore(deps): Bump es5-ext from 0.10.62 to 0.10.64 (#533)

    Bumps [es5-ext](https://github.com/medikoo/es5-ext) from 0.10.62 to 0.10.64.
    - [Release notes](https://github.com/medikoo/es5-ext/releases)
    - [Changelog](https://github.com/medikoo/es5-ext/blob/main/CHANGELOG.md)
    - [Commits](medikoo/es5-ext@v0.10.62...v0.10.64)

    ---
    updated-dependencies:
    - dependency-name: es5-ext
      dependency-type: indirect
    ...

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

commit b679abd
Merge: 125aecd e2e1530
Author: Gagan Deep Singh <gagandeep.singh@rtcamp.com>
Date:   Tue Feb 27 11:14:28 2024 +0800

    Merge pull request #530 from GoogleChromeLabs/chore/rename-third-party

    Rename `third_party` to `assets`

commit e2e1530
Author: Gagan Deep Singh <gagandeep.singh@rtcamp.com>
Date:   Tue Feb 27 11:08:37 2024 +0800

    Rename `third_party` to `assets`

commit 125aecd
Merge: 0a9ce90 bc7ce7d
Author: Mohammad Taqui Sayed <6297436+mohdsayed@users.noreply.github.com>
Date:   Tue Feb 20 20:40:55 2024 +0530

    Merge pull request #510 from GoogleChromeLabs/develop

    v0.5.1

commit 0a9ce90
Merge: a9108fc 97e74d8
Author: Mohammad Taqui Sayed <6297436+mohdsayed@users.noreply.github.com>
Date:   Wed Feb 14 09:14:13 2024 +0530

    Merge pull request #490 from brdaugherty/patch-1

    Nit: remove unneeded word

commit a9108fc
Merge: 8d44846 69b140b
Author: Gagan Deep Singh <gagandeep.singh@rtcamp.com>
Date:   Wed Feb 14 05:58:55 2024 +0530

    Merge pull request #492 from GoogleChromeLabs/fix/launcher-dev-tool-default

    [Main] Disable auto opening of Chrome DevTools by default for all tabs

commit 97e74d8
Author: Brian Daugherty <brdaugherty@gmail.com>
Date:   Tue Feb 13 09:49:54 2024 -0700

    Nit: remove unneeded word
packages/extension/src/view/devtools/components/layout.tsx Outdated Show resolved Hide resolved
packages/extension/src/view/devtools/components/layout.tsx Outdated Show resolved Hide resolved
<div
className="w-full h-screen overflow-hidden bg-white dark:bg-raisin-black"
ref={contextInvalidatedRef}
<SidebarProvider
Copy link
Collaborator

Choose a reason for hiding this comment

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

❤️

@mayan-000 mayan-000 requested a review from mohdsayed March 6, 2024 07:58
@mohdsayed mohdsayed modified the milestones: v0.6.0, v0.7.0 Mar 12, 2024
@mayan-000 mayan-000 requested a review from amovar18 April 2, 2024 12:47
@mayan-000 mayan-000 requested a review from mohdsayed April 3, 2024 06:33
@mayan-000 mayan-000 requested a review from amovar18 April 3, 2024 15:26
Copy link
Collaborator

@amovar18 amovar18 left a comment

Choose a reason for hiding this comment

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

LGTM!

@mohdsayed mohdsayed merged commit 84b0e61 into develop Apr 4, 2024
4 checks passed
@mohdsayed mohdsayed deleted the ref/provider-to-sidebar branch April 4, 2024 12:00
@mohdsayed mohdsayed mentioned this pull request Apr 11, 2024
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.

Map blocked reasons to pre-filtered cookie table view
4 participants