-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cookie whitelist #31
Cookie whitelist #31
Conversation
removed standard cookie deletion and replaced it with a loop deleting all cookies not found in whitelist storage of list and UI still needed
added image to represent whitelist button add update whitelist with cookiedomain change delete info to detect whitelisted cookies properly TODO: fix button styling TODO: fix button if whitelisted TODO: remove from whitelist if clicked on button of whitelisted cookie-whitelist TODO: don't place duplicate whitelist items TODO: make whitelist a dictionary instead of an array
Thanks @jeroen7s for the PR I won't have a chance to review the PR earlier than weekend, but as I see there are still a lot of TODOs, I assume the PR is not yet ready for the review, right ? |
I don't have yet any linter, or contribution guide setup yet and probably there is a lot of refactoring I need to do one day, so I'll really appreciate if you keep the coding/naming consistent with current implementation. The more readable is code and consistent the easier for me would be to review it. |
feedback is always appreciated |
small question |
making whitelist into a dict removing item from whitelist if clicked on button of whitelisted item changing location of cookie deletion on startup (not only deleted if delete all option is set)
welp, will not have much time this weekend after all, guess it will take a bit longer |
@jeroen7s No worries - take your time, thanks a lot for providing PR though. Currently I'm busy with another project so I'll not annoy you with the Merge conflicts soon :) |
refactoring code to extract cookiedeletion to separate function fixing dictionary handling in deletecookie method rewriting whitelist to cookie comparison logic making logic more compact
fixing logic that removes item from whitelist updating code to use includes instead of indexOf >=0 replace regex dot removal with function
I think most of the work is done now |
I'll try to have a skim before the weekend, otherwise I'll do full review, on weekend. |
…e to extract cookiedeletion to separate function fixing dictionary handling in deletecookie method rewriting whitelist to cookie comparison logic making logic more compact
changed structure of cookiewhitelist adapted whitelisting and deleting logic accordingly
updated the code now, implemented the feedback |
I'll again try to review that during the week, otherwise will do complete review over the weekend.
I see, yes it might seem to be complicated, here are some thoughts, hope they will make the task simple:
Differentiate the statesCurrently the differentiation is done using data attributes for example
Reflect list item whitelist state when loadedWe have two places where we are loading cookies, first when we are loading Domain cookies and when we are loading Cookies for domain.
Detect local storage changeChrome storage API does have onchange event, this can be used for detecting whitelisting changes and update the table accordingly. We are already detecting cookies change and act accordingly here. So we might need something like Reflect change on the UI accordinglyReflecting changes on the UI I think can be done similarly as in the
Hope this helps. |
I thought you plan to use icon rather than "toggle switch", "wl", "bl" does only say something to the English speaking user, but that's not a good idea to label the switch states, in general the switch needs to be updated to use no label and have improved accessibility. Suggestion: I think if you keep consistent with your initial idea of the custom icon, that will probably work better for now, rather than updating a label that will need to be translated as result. For accessibility reasons a native tooltip can be used, as there is no characters limitation for that and might be more descriptive. |
fixing buttons to image in view instead of using switches updating css to fix scaling of buttons
…st method cleaned up calls to updateWhitelistInList
…t logic fixed up code updated getcookies to only update whitelist status for that domain
fix error on opening cookies from domain without data in whitelist
adding data-i18n to button
@jeroen7s I'm Sorry for being slow this weekend (Traveling), I might have not much time next week either, but will try to do full review again, otherwise I'll do the week after. |
should pretty much be done now |
@jeroen7s Thanks, I'll review the changes over the weekend. |
We are almost there. Besides of 2 comments I have left, there are still some nits that needs to be fixed. Regarding comments: If you are fine with the comments, can you please add those two fixes as well ? Regarding Nit picking: I think they shouldn't be discussed in the review, but rather should be test implemented for detecting them. So let's keep them outside of the scope of current PR, I'll followup and fix them separately and setup a Travis CI which will spot inconsistencies automatically, after we can adapt the linters if any disagreement regarding styling. Basically: Please fix 2 comments when you have time, I'll take care for the rest. |
That was fast :) LGTM and thanks a lot for the PR 🎉 |
awesome 🎉 thanks a lot |
PR for adding ability to whitelist cookies #30
i'm not a JS developer nor a chrome extension dev
so feedback is definitely welcome
TODO: fix button stylingTODO: change button icon if whitelistedTODO: remove item from whitelist if clicked on a button of a whitelisted cookieTODO: don't add duplicate whitelist itemsTODO: make whitelist a dictionary instead of an arrayTODO: rewriting logic to detect if cookie is in whitelistTODO: add button to whitelist domains instead of specific cookiesTODO: reusing logic for delete all cookies button