stylus icon indicating copy to clipboard operation
stylus copied to clipboard

"Pin" a style so it won't be overwritten when importing backups

Open dayfuaim opened this issue 7 years ago • 8 comments

I have feature request.

We need the ability to "pin" style, i.e. make it non-upgradable with export operation.

Reason: I have several browsers having their own customized styles, which I don't want to erase during import/export.

Pinned styles could be exported but you can't "upgrade" them by import as they're "pinned".

dayfuaim avatar May 07 '18 20:05 dayfuaim

Seems quite an edge case. You can make a copy of the backup and manually edit it to contain only these specific styles, then import it after the common backup.

What we can do for sure is to always show a list of styles in the backup before importing it, with a checkbox for each style that's not identical.

tophf avatar May 08 '18 05:05 tophf

What we can do for sure is to always show a list of styles in the backup before importing it, with a checkbox for each style that's not identical.

Yes, it will be very helpful. :)

dayfuaim avatar May 08 '18 10:05 dayfuaim

I think it might be easier to include a button to un-associate a modified style from it's update source. Press a button and the style acts like it was written locally.

Mottie avatar Jul 15 '18 15:07 Mottie

Not sure if I have read it correctly. I think @dayfuaim needs a feature that can "pin" a style so that when importing a backup, the style won't be overwritten by another style having the same name.

This is unrelated to style updates.

eight04 avatar Oct 03 '18 02:10 eight04

Yes, something like this.

And just another idea came to me about it: give backup file a name containing browser's name (and maybe platform if mobile), not just date, i.e. "stylus-2018-10-04 -Firefox-mobile .json". This is for not to be confused with desktop and mobile versions of the same browser.

dayfuaim avatar Oct 03 '18 08:10 dayfuaim

+1 for this request.

My variant or use case is: "for some way to facilitate the process of updating a style from remote that may have local changes. I'm not suggesting necessarily add a full diff-merge feature (although that would be most user-friendly) but just be able to save a copy of a changed style locally, have it show up distinctly from the source, so that when the source style is updated, it is completely clear which was updated / over-written."

actually "what was updated" is quite clear already: locally changes will be over-written (!)

So for my case, this feature-request devolves into just a request to easily make a local copy. In fact, there is a sort-of way to do this, and I just added the section to the FAQ

edit: And now there is another wiki section that describes a way to create a "companion style" which I think will accomlish OP's request to

"pin" a style rendering it "non-upgradable"

so for now I would think this is works-as-intended and incidentally I heard it was to be a wont-fix anyway

TT-- avatar Oct 31 '18 23:10 TT--

@TT-- This feature has nothing to do with style update. See https://github.com/openstyles/stylus/issues/384#issuecomment-426496502. Please open a new issue to describe your need.

eight04 avatar Nov 01 '18 02:11 eight04

@eight04 ok, I didn't know it was unrelated. actually I was directed here by @Mottie who indicated that this was "just what you're asking" [for]. Yes, my case was was worded as specific to when an update comes via "update" and not "import", but it seems there is commonality, being able to save an un-linked local copy of a style. And since a way to do that was recently detailed in the wiki, it is now clearly possible and not too difficult. (I also found out it's quite easy to do by directly editing the json export file to remove the updateUrl, etc.)

TT-- avatar Nov 01 '18 15:11 TT--