-
Notifications
You must be signed in to change notification settings - Fork 279
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
Fix for thimble.mozilla.org#2508 - Quick Edit UI for box-shadow property #888
base: master
Are you sure you want to change the base?
Conversation
Hey team - I'll be a bit delayed in checking this out. Just moved to a new machine and my Github stuff seems broken. |
Hey this is great! I'll provide some more feedback later. One thing I noticed is that if you are editing a value in one of the input boxes, if you backspace to delete a value like By the way, great job getting this running! These inline editors are tricky. I'll give some thought to how we can treat overlapping editors. cc @gideonthomas @humphd do you have any thoughts? Maybe the little Icon could indicate the type of editor that it will pop up, so the user knows what to expect in ambiguous cases. Is it possible to set a priority order for the editors? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do a more thorough review after you fix the indents throughout this patch. It's looking like you're making it really far into this, nice job.
Question: what does tinycolor-min do? I wonder if we already have this type of code available in Brackets core.
@@ -0,0 +1,268 @@ | |||
define(function(require, exports, module) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix all new files to use 4-space indents please? There are some other indent issues below as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tinycolor-min is used in the InlineColorEditor at a stage for detecting if the color value is valid.
I didn't get the complete hang of it's but I used it anyway.
@flukeout Consider that a current value is - |
Sorry for the delay @Cryzek - am back in action now. Is it possible to replace the value with 0 when you blur the input field? It's just really cumbersome right now when trying to change a 0 value to something like 3. We could do this maybe by replacing the value in the CSS with 0 when the input field is blank, and then filling in the field with the 0 when you leave the input field? However If we replace the text inputs with sliders, we won't have to deal with this anymore since there will be no text editing of the values. What do you say to that? |
@flukeout Thanks for the feeback. For the second comment, yes it is. |
@Cryzek how is this coming? |
I'm sorry I haven't able to work on this for a while now. I had made a few changes earlier but after that I haven't worked on it further. Can I let you know in 2-3 days? |
@Cryzek yes, that's fine. I just wanted to check in. |
Related to thimble.mozilla.org#2508 for creating an extension to open quick edit UI for box-shadow property( similar to color-picker). This is a very early version with bugs, and lot of unnecessary comments, logs. It's a work in progress.
@flukeout I have made this working with input sliders. Can I use your css code from the ongoing work on border-radius quick edit by feihaozi77? |
Related to thimble.mozilla.org#2508 for creating an extension to open quick edit UI for box-shadow property( similar to color-picker). This is a very early version with bugs, and lot of unnecessary comments, logs. It's a work in progress.
Rewrote most of the code from a huge procedural chunk to objects of type BoxShadowInput viz. BoxShadowLength, BoxShadowColor. The new responsibilities are - + InlineBoxShadowEditor - It initialises the widget and acts as intermediary for propagating values between text editor and box-shadow editor + BoxShadowEditor - The overall manager for different BoxShadowInputs. Gets values from InlineBoxShadowEditor and passes them to the appropriate BoxShadowInput. +BoxShadowLength - BoxShadowInput for length types +BoxShadowColor - BoxShadowInput for color value
…l.iterator to simple counter over array
@humpd Could you take a look? |
Earlier, the BoxShadowEditor, BoxShadowLength, BoxShadowColor were importing and using the complete exports objects. Fixed by requiring only the component. eg. changed `require("BoxShadowInput")` to `require("BoxShadowInput").BoxShadowInput`;
Created BoxShadowInset that responds and provides control over `inset` property in box-shadow
…e box-shadow editor InlineBoxShadowEditor uses a `orderOfValues` to preseve the user provided order of values while building the boxShadowString when changes are made in widget. Note: Changes to BoxShadowEditorTemplate.html - renaming `slider-container` to `color-container` for color input Changes to style.less - translation of toggle by amount of its width
Hi @humphd @flukeout. Sorry for the huge delays. |
Related to mozilla/thimble.mozilla.org#2508 for creating an extension to open quick edit UI for box-shadow property( similar to color-picker).
This is a very early version with bugs, and lot of unnecessary comments, logs. So, it's not the most robust one.
It's a work in progress.
@humphd @flukeout I have a lot of doubts on this one -
box-shadow: 1px 1px black, -1px -1px grey