-
Notifications
You must be signed in to change notification settings - Fork 19
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
Refactor: Add the capability of setting "allow list" content policy #422
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…omain and parent domain
mohdsayed
approved these changes
Jan 16, 2024
4 tasks
mohdsayed
added a commit
that referenced
this pull request
Jan 29, 2024
) * Add permission for contentSettings * Clear contentSettings.cookies when browser window is opened * Add custom hook for allowed list * Create state for and handle classes in body row * Update TableProps and details component * Add mock test data and test for bodyRow * Add test for BodyRow * Update useAllowedList hook to handle session storage * Add test data for cookie table body * Add method for adding domain to allow list * Add new clors to tailwind * Add condition before loopin through storage.allowList * Refactor cdoe * Refactor code * Refactor code * Add types * Refactor code * Refactor code * Refactor code * Use async/await instead of promise then * Refactor code to move onClick function to a utility * Update details section for allowed cookies * Show green for an item that is not blocked and allow listed * Show green border for allow listed items even if they are blocked * Fix state update * Capitalize R in blocked reason * Refactor: Add the capability of setting "allow list" content policy (#422) * Add new key in CookieTableData type * Pass row context menu as prop and remove useAllowList hook * Move useAllowedList logic into standalone functions * Move conext menu into CookieListing and introduce states and callback for modal * Remove selected row from table * Stop propagation on click * ref: Refactor the utils handling clicks, removal of domain, setting domain and parent domain * perf: clean up unrequired calls * chore: delete already moved files * ref: Refactor useEffects * fix: Update condition for getting domain in allow list * ref: move row context menu ui and logic to separate component * ref: move allowed list logic to a hook * test: add tests for rowContextMenu * fix: capitalize context menu options * test: add tests for utils * Add reloadCurrentTab to reload current tab * Reload page on adding domain to allowed list * Fix url pattern issue * Fix styling for border left * Update message * Update text for context menu * Allow cookies for domain with dot prefix * Refactor code * Fix tests * Remove condition for fixing remove allow list issue * Remove unused code for useHighlighting * Fix parent domain double click issue * Code improvements and refactoring * Fix test case * Add code improvements * Fix test * ref: use domains list as prop * test: fix test --------- Co-authored-by: Mayank Rana <58820001+mayan-000@users.noreply.github.com> Co-authored-by: Mayank Rana <mayankranax1@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR refactors the implementation for allow list to better align with
extension
by adding new key toCookieTableData
calledisDomainInAllowList
, and moves/break down the logic fromdesign-system
to theextension
package.Relevant Technical Choices
Testing Instructions
Additional Information:
Screenshot/Screencast
Checklist
Fixes #