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
feat: Article card #1027 #1028
feat: Article card #1027 #1028
Conversation
@mturoci better to align title and toolbar with base line of the font. and reduce space between heading 1 and paragraph. |
Even for price of breaking the card's padding? |
|
@shihan007 this doesn't answer my previous question. The hover effect will ignore the
The spaces are based on the design - 24px top and 16px bottom margin for title. What should be the correct values then? |
@mturoci why do we need a toolbar for this card layout? It wasn't in the requirement doc or in the design |
@mturoci these are icons which does not take more that 24px x 24px space. placing buttons like that takes lot of space. |
@mturoci if we are placing icons lets middle align icons with the title. Hover effect not a issue |
Thanks @shihan007, what about the correct spacing between title and paragraph? |
@mturoci for cards like these better to have a small size toolbar (height set to 24px, font size 12px). For containers and pages we can use normal toolbar (font size:14px and default spacing) Space between title section(title+subtitle) and paragraph = 16px |
@shihan007 should be good now - 24px toolbar |
@mturoci yeah this is great. Apply mentioned spacing on title and paragraph too |
Already done, I updated the latest screenshots in a PR description, feel free to check. |
Agree with @shihan007 - The large toolbar doesn't fit in here. This is meant to be a card for long-form content, with only minor actions (upvote / share) associated with it, if any. The full / right-aligned toolbar seems overbearing. I'd prefer what was requested in the original design (link) - a title, no subtitle, no caption, a de-emphasized set of icon-links, and content (markdown). |
Also see comment about |
Implemented with API/** Create a set of mini buttons laid out horizontally. */
export interface MiniButtons {
/** The buttons in this set. */
items: MiniButton[]
}
/** Create a mini button - same as regular button, but smaller in size. */
export interface MiniButton {
/** An identifying name for this component. If the name is prefixed with a '#', the button sets the location hash to the name when clicked. */
name: Id
/** The text displayed on the button. */
label: S
/** An optional icon to display next to the button label. */
icon?: S
}
/** Create an article card for longer texts. */
interface State {
/** The card’s title, displayed at the top. */
title: S
/** Markdown text. */
content?: S
/** Collection of small buttons rendered on the other side of card's title. */
mini_buttons?: MiniButtons
} |
@mturoci Looks good. Minor changes:
|
cc @lo5 for final design review |
7d3c1e5
to
c5c7f60
Compare
API to review:
Used card-wide
commands
prop that is auto-added to every card and hid the rendered menu in top right corner. wdyt @lo5 ?Design notes:
- what would be the best to do in this case? - cc @sandruparo @shihan007 @shanaka-rajitha
Closes #1027