-
Notifications
You must be signed in to change notification settings - Fork 179
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
Element lock ratio for size and padding should be stored to data model #1075
Conversation
Size Change: +133 B (0%) Total Size: 869 kB
ℹ️ View Unchanged
|
@pbakaus @dvoytenko @miina @barklund When we select the element with same horizontal and vertical padding the initial padding lock is enabled. If we have different horizontal and vertical padding initially then the padding lock will be opened. One thing here is when the padding lock opened and we input the same value on horizontal and vertical then the padding lock enabled. Would you confirm if we need to keep padding lock open in this case? |
@ndev1991 I'd expect that the padding lock based on the padding value should be the default (e.g. on refresh), however, the user should still be able to unlock/lock the padding as they'd like, without it automatically changing the value. Meaning that the initial padding lock state value could be set by Otherwise, the following could happen for example: if the user unlocks the padding, writes |
@miina Actually it doesn't happen in that way. If the user unlocks the padding and the h is 10 and the input v 100 is fine. but if the user input the h as 10 and input 10 for v and click h again, then the padding locks |
@ndev1991 Just tested it out, it does happen this way currently: When there is In any case -- the user's choice should remain and not change back unexpectedly, the paddings being equal is relevant for the default only. |
IMHO the padding lock should never lock itself on user input of values. Just because they temporarily appear to be the same (10, 10) does not mean the user indicated that she wants them locked. |
Hmm. Sounds like this was a horrible suggestion by me. But what should be the behavior? Do we want to make the lock persistent in the data model then? |
That‘d be a possibility, yes. |
@pbakaus @swissspidy @dvoytenko We need to add padding lock persistent in the data model. Would you confirm? |
@miina @dvoytenko Added paddingLockOpen to element property so we can solve above problems. |
yes, padding lock should be persistent in the data model. Thanks! |
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.
Would prefer a rename, otherwise looks good.
Did we confirm we need lock for aspect? Last time I asked @samitron7 she didn't want one. /cc @pbakaus as well. |
@dvoytenko @pbakaus @swissspidy Here is the current workflow of padding lock and aspect ratio. If we want to go for each element, lock toggle should be disabled status? |
This is a good point. No matter how we approach this, from the data model point of view: it makes no sense to allow "padding lock" if H and V values are different - otherwise we won't be able to change them. And probably we just need to ensure there're no inconsistencies and it would be enough. |
@dvoytenko @barklund Following the second option, it uses the common lock ratio for padding and size. When there are multiple values, assume it as locked and update the lock ratio for element also. |
@dvoytenko should this have a migration? If width/height are still proportional to originalWidth/originalHeight, we migrate to locked? And similarly, if paddings are still equal, we migrate to locked? Or should we just assume all old stories now to be unlocked, and it's not really a big issue? |
We can have basic thing on it. Like |
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.
Very close. But some questions. I'll also loop in Paul on this.
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.
Just one update requested.
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 just have a few comments about tests, otherwise things look really good. Please think about good simple test descriptions, that don't go into unnecessary technical details and try to use labels or visual texts rather than test ids whenever possible.
Fixes #1024
Add aspectLockRation to element as true, and padding locked to text element as true. If multiple element selected with different ratio it will be as true.