-
Notifications
You must be signed in to change notification settings - Fork 352
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
Supporting Shadows and Rounded Corners on Images and Buttons #221
base: develop
Are you sure you want to change the base?
Conversation
CC'ing @drwasho as well as he is working on this with me. |
I like the idea. How about using properties that resemble CSS, such as |
Like @gtramontina mentioned, I think instead of using That said, when it comes to shadow-related attributes, I actually like @hoffmabc 's approach. The reason I didn't follow a lot of CSS attribute naming conventions (although resemblant) was because a lot of them are needlessly complicated and confusing, which is understandable because the people who worked on the standard basically made them up as they went, which is natural for a new piece of technology.
I always hated how I have to always look up the order of these things to get them right, every single time (I still have to, and I'm sure most of you guys do too). With Jasonette we have a great notation which frees us from having to remember the exact order (because the order of the keys doesn't matter in JSON), and I think we should take full advantage of it. So the bottom line we should make sure we have a style attribute for every single styling property. For this reason I don't think we need to always follow the css naming convention. To summarize:
p.s. One thing I'm concerned about though: I'm not sure if i will have time to work on the Android version immediately... |
One more thing I just came up while thinking about box-shadow, if we're going to implement shadows, maybe we should cover all of what box-shadow covers (or at least design it and name the attributes with the assumption that we will expand to support all of the box-shadow attribute equivalents eventually). For example the current proposal doesn't have a blur or directional attributes, but if we do end up implementing shadows, wouldn't people expect those naturally? |
Remove tweak
Ok I broke out the shadows and rounded button to helper methods so they can be reused. I cleaned it up and followed the conventions you set above, adding the blur and offset stuff for shadows. I also added the left menu. I'm going to go forward and add in support for other places as well. |
Sounds great! Btw thanks for resurfacing the left menu, I originally had implemented the left menu but decided to bury it because I couldn't figure out some edge cases. I think one was that the left menu automatically turns into an I was thinking about this and couldn't make up my mind so decided to just launch without it, and renamed the right menu as
Would love to hear thoughts, or if I'm not making sense, feel free to ask me to clarify. Thanks! |
@hoffmabc I am trying to merge this in. But as always, I want to make sure what we have here on the iOS side is in line with the Android counterpart. Which means we'll need to implement some of the features not yet implemented on the Android side. I do plan on going through the code but when you have time could you give a quick summary of the current status of this PR, in terms of the features? That would be super helpful. Thank you! |
This is a proposed idea based on a need we have on our project.
I've first pushed code to demonstrate for right-menu buttons, but this could apply to any image and/or layer and left menu as well.
It supports borders and drop shadows.
For your component you must specify certain attributes in the style section.
These are the ones supported by my code submission. There are defaults for all except the shape, which of course by default would just be the normal square shape.
An example of this in action is: