pollen icon indicating copy to clipboard operation
pollen copied to clipboard

Add shadow alias for elevation

Open shannonrothe opened this issue 4 years ago β€’ 3 comments

@madeleineostoja I've gone with the naive approach for #64 here πŸ™‚

I thought it might be cool to provide some kind of "alias" map to formatModule, that way things can easily be aliased and you don't need to worry about duplication. For this naive solution, any change to "elevation" would require "shadow" to be updated too. I'm happy to explore that some more if you think that's a better way forward πŸ‘πŸΌ

Approach 1: https://github.com/heybokeh/pollen/pull/65/commits/451c93e796f8133ae182c1e56ac55bd20549fb24 (naive) Approach 2: https://github.com/heybokeh/pollen/pull/65/commits/40cdc51620c51394e6eb0fafa60c7f7e3e608cb1 (more flexible/scalable)

shannonrothe avatar Mar 01 '22 04:03 shannonrothe

Wow express! Thanks for this! I'm not even 100% sure on replacing elevation with shadow anymore after reading some more comments, but this is great. What's your take re: the names?

If we were to replace elevation with shadow then the basic approach makes more sense. If Pollen was to support true aliases then the other approach is a solid start. I feel like that's something that could be exposed via config as well, though I'm not sure on the utility of aliases, probably just muddies the waters for consumers of a design system (pollen's defaults or a custom one)

madeleineostoja avatar Mar 01 '22 05:03 madeleineostoja

What's your take re: the names?

IMO shadow is more obvious than elevation but since that would be a breaking change I can see the dilemma πŸ˜…

shannonrothe avatar Mar 01 '22 05:03 shannonrothe

Yeah I think it is probably a good change. Someone mentioned that elevation makes a lot of semantic sense (ie: conveys layers rather than just misc shadow effects), but idk. I might just leave it open for now and see if anyone else wants to weigh in. At the end of the day can always merge and just strip one or the other out next major version, in the meantime it’s just whatever we put in the docs

madeleineostoja avatar Mar 01 '22 09:03 madeleineostoja