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
Add style exclusions. Closes #113 #360
Conversation
Mottie
commented
Mar 5, 2018
•
edited
edited
- Popup: Right click on a style's check box to open exclusions menu for a page.
- Manage page: "Excluded on: ..." added to "Applies to" column (in both old and new UI).
- Edit page: Excluded Pages section added to side bar.
So far this looks pretty nice :D one bug I've run into so far though is that if I an exclusion through the edit style page and then go and add one through the popup menu it goes and deletes any excluded sites I had added through the edit style page. Edit: Well since we found out this "small bug" was actually just me forgetting to save after adding excludes from the edit page guess that's that xD |
The popup menu select should highlight an option if it's already in the exclusion list. If you remove it in the popup, it also removes it from the exclusion list. For example, if you right click the checkbox on google.com, you should see select options with "Domain: google.com", "Domain: www.google.com" and "Prefix: https://www.google.com". If you already have "google.com" in the list, it should be highlighted. If you remove it from the select, it'll remove it from the exclusion list. You can also select multiple options; I know this will add duplicates, but you can change them from the edit page for more fine-tuning. |
Solved in chat: Make sure to save any exclusions you add from the edit page, they don't automatically save with the style. |
Will remember that for now on haha :P |
Popup:
Editor:
|
This still being worked on? Would love to see this get implemented into the stylus fully.. |
Yeah, I am... on and off (prepping a baby room 👶). I ended up almost totally rewriting it and I still have one more issue to work out before I update this PR. |
Ahh sounds fun :p and glad this is still being worked on. Can't wait for this to get into the actual releases of stylus as so far I've just been running the latest releases while adding in the exclusion branch stuff myself to stay up to date but having to manually do it get's tedious after a while. |
Still not working yet... I wanted to push the current changes here because my hard drive has been acting flaky. Last issue I need to address (that I remember) is getting the popup to update all tabs after adding/removing exclusions; the database gets updated, just not the active tabs. And @JourneyOver, since you've been using this branch, you'll need to go through each style that has an exclusion and edit a single entry to get it to save the modified regular expression. Previously, if you added |
Got it! thanks for letting me know. :) |
Hmm seems something is broken between the latest commit 4a1c163 and the latest changes with this branch, right clicking the checkbox that opens the "Exclude the site or page" and clicking on one of the options and then pressing "ok" doesn't seem to add it to the excluded for the style. Doesn't seem to matter which option you choose from the menu. Currently seems the only way to add excluded stuff for themes at the moment is having to go into the theme and add the exclusions manually. Didn't find this issue until now since I haven't had to exclude any new sites from a theme until now and I manually fixed up exclusions in the themes I previously had exclusions in after I updated so I hadn't tested your new changes until now. I know it was working just fine before, dunno if it was a commit in this branch or master branch that ended up breaking things. Another thing I notice as well, opening and closing the "exclude the site or page" makes the stylus dropdown menu keep expanding down each time you open it until it gets to about this size and then it stops expanding. |
Thanks @JourneyOver, I've fixed the expanding popup; but I've been having a lot of difficulty with getting the exclusions to update dynamically. Previously, when it sorta worked, excluding a style would completely remove it from the list of styles in the popup. Now, the excluded style is visible & red; but updating it for all tabs is just not working. I think I'm going to need @tophf to look at the code and provide some suggestions. |
@Mottie it looks like whatever you did recently fixed the problem I had noted above about it not adding the exclusion when using the exclusion popup (it adds the exclusion to the exclusion list for the theme along with marking the theme red in the popup for said tabs with the excluded site now) though it seems to still be kinda iffy on it adding it or not. sometimes it'll be added and sometimes it won't. This is the error that comes up when it decides that it doesn't want to add the exclusion to the site --and I can confirm that the expanding popup thing is fixed now as well. |
@Mottie looks like the error is now fixed and seems to be adding any and all exclusions through the popup that I have thrown at it so far testing on various themes/sites ^^ |
It's not working for me if you add or remove an exclusion... I mean, the exclusion isn't being added or removed from the active or other browser tabs. |
Hmm it is for me O_o I'm running latest master commit and merging in the commits from this branch/pull request, dunno if that makes a difference or not. unless your talking about making the style disappearing from the stylus popup on tha tab/other tabs for the excluded? for me it just turns red when it gets excluded. |
Please tell me this hasn't been forgotten about and is still being worked on.. So waiting for this to be included in stylus by default :s |
It's not forgotten, but it is on the back-burner... I haven't had much time to mess with the branch. |
@JourneyOver Please test the latest updates. |
Glad to see new updates to this :D Bugs:
Going in removing exclusion and re-adding it seems to somewhat fix the toolbar icon, it stills end up being greyed out but it shows the active styles number as well. Example -- https://i.imgur.com/VoHismF.png refreshing the page brings back the color to the icon completely.
Example -- before it never appeared in the dropdown unless there was a sonarr or radarr in the url somewhere, but now for the most part is just shows up in the dropdown through the whole site for the most part if the site is in the excluded.
Those are at least a few of the bugs I've noticed in the latest update. If I run into anymore I will post them up. |
How are things going with this? |
@eight04 since #510 has been merged in from the looks of it, any idea when you might possibly get back to this? As there are now too many changes to master and this (and so many conflicts now as well) that I sadly can't go about just merging changes and continuing to use exclusions :/ so I am now stuck in the past on stylus versions as I kinda rely on exclusions for various styles atm. |
We have to reimplement this on the current master (maybe after fixing all 1.5.x bugs). Also, @Mottie is designing a new style manager, so I guess we can first add the exclusion dialog to the popup and the editor. |
Unfortunately, there is no working version of this PR currently. AFAIK, this PR hit a brick wall because some of the functionality was impossible to implement at the time. Pretty sure this PR was a big reason eight04 refactored the entire storage system. We're still working out some of the kinks with that major update, and the dev who was working on this PR is currently busy with a different one when he has time to spare, but we all recognize that this is an important feature, so I'm confident that it'll happen eventually. Hopefully sooner than later. |
Anyone still looking forward to this may take a look at #666. |