[NcActionButton] Inconsistent icon position
Opened this issue · 4 comments
ShGKme commented
ShGKme commented
@nextcloud-libraries/designers what position is preferred?
Jerome-Herbinet commented
I prefer the second one (vertically centered). That said, IMO, it's not a bug.
marcoambrosini commented
Although I also prefer center aligned when there's only one line of text, I think that the better strategy for this component is to top align given that it accepts multiple lines of text. When there are multiple lines of text, the icon gets further and further away from the title.
Here's a real world example of top aligned. @ShGKme note that in your screenshot the icon is not properly centered with the text.
![Screenshot 2024-02-22 at 09 59 12](https://private-user-images.githubusercontent.com/26852655/306932096-27044fef-4edc-4222-8c3d-1659d5d19584.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUyOTQ1MTUsIm5iZiI6MTcyNTI5NDIxNSwicGF0aCI6Ii8yNjg1MjY1NS8zMDY5MzIwOTYtMjcwNDRmZWYtNGVkYy00MjIyLThjM2QtMTY1OWQ1ZDE5NTg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAyVDE2MjMzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNjODYzNThhNTc2YWFkMDk4N2JjNWIxMGFiYjQ4OTY2YTdmMGRmOTNlNDY5ZjZhNjViYmQxMmEwNzE3OTE0MTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ETfkg7HmG1XLqXzrHR3nEeZzRVq9SpVNeQ5IcIa9qAg)
jancborchardt commented
Yep, confirming what @marcoambrosini said, it's better to have it aligned to the top, with the heading. Otherwise the icon is basically at an arbitrary position.