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

Remove Delay & Remember Box Size #1

Open
aleemb opened this issue Nov 11, 2013 · 4 comments
Open

Remove Delay & Remember Box Size #1

aleemb opened this issue Nov 11, 2013 · 4 comments

Comments

@aleemb
Copy link

aleemb commented Nov 11, 2013

I have been using the Test Styles Bookmarklet for close to some 8 years if not longer. However I recently switched to a Mac and on Google Chrome after a few page reloads the Test Styles popup needs to be closed/re-opened for it to work again.

That's how I came across your wonderful extension. It's absolutely ingenious that it remembers my CSS so I don't have to worry about losing my work. And having a shortcut for it is much more convenient than a bookmarklet.

However, unlike the Test Styles bookmarklet (and Chrome Developer Tools for that matter), this plugin isn't instantaneous. This makes small tweaks quite annoying. I am not sure why the delay is there in the first place, possibly as a debouncer but it gets in the way.

The second annoyance is that the edit window is extremely small. I can resize it but when I reload the page, it goes back to the same size. Writing CSS in a small 3 line editor can be extremely annoying. I typically write a whole bunch of CSS live then clean it up and shift it over to my .css/.scss files and I do a bunch of reloads (after editing HTML) which means I need to resize each time.

Thanks very much!

@aleemb
Copy link
Author

aleemb commented Nov 11, 2013

It does remember the editor size though, my bad.

@jhubert
Copy link
Owner

jhubert commented Mar 2, 2014

Hi @aleemb. I've been unable to recreate the delay. There definitely it not any intentional delay in the editor. In my chrome window, it pops up in under a second. Does it happen for you on every page or just on specific pages?

@aleemb
Copy link
Author

aleemb commented Mar 2, 2014

I don't remember exactly but I think it's this 1000ms timer. To be more efficient you could use a debouncer + a keyup event (and an on paste event) and update as needed.

Also I just tried the extension again, it doesn't seem to remember the window size. The default size is also a bit too small to be useful without resizing every time.

@jhubert
Copy link
Owner

jhubert commented Mar 2, 2014

Ah, for some reason I thought you were referring to the opening of the editor not the refresh time.

Yes, there is a 1 second delay in rendering the changes. I believe I originally added it to reduce the load on the browser, but that's probably no longer necessary. I'll look at updating that.

There seems to be an issue in the editor in that it only remembers the box size when the editor is closed by either the [x] button on the editor or the chrome editor icon. If you use the keyboard shortcut or just reload the page, it's not remembered. I'll look into this as well.

Thanks for the feedback! 👍

jhubert added a commit that referenced this issue Mar 2, 2014
jhubert added a commit that referenced this issue Mar 3, 2014
jhubert added a commit that referenced this issue Dec 2, 2014
jhubert added a commit that referenced this issue Dec 2, 2014
jhubert added a commit that referenced this issue Dec 2, 2014
jhubert added a commit that referenced this issue Dec 2, 2014
jhubert added a commit that referenced this issue Dec 2, 2014
- Alert the user if they use it on a chrome:// url. Closes #9
- Alert the user if they use it on a file:/// url. Closes #7
- Set the default chrome key command to Shift+Ctrl+E. Closes #8
- General code cleanup and linting

This commit also makes the box size save properly if the user uses
the key command to close the editor because of the way that the
browser_action commands work. Per #1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants