-
-
Notifications
You must be signed in to change notification settings - Fork 256
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
Feature: Title and description for tabs #3442
base: main
Are you sure you want to change the base?
Conversation
Code Climate has analyzed commit 45318a0 and detected 0 issues on this pull request. View more on Code Climate. |
I think I mede it as I should, but I do not know what can I put into title and description of tabs. Also I don't know why tab_group_component_spec and tab_swicher_component_spec are empty. |
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.
Looking good already, @Nevelito. Thank you!
Let's make two minor changes:
- Use the instance variable directly in the component instead of defining a public reader. Instance variable access is faster than reader access.
- In the tab header component, let's add the
def render?
method, and inside it, define the logic as(@title || @description).present?
. This way, we avoid rendering an emptydiv
if there is neither a title nor a description.
Otherwise, it's looking good! 👍
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.
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.
Seems a bit to much to render the whole Avo::PanelComponent
when we only want to render the header section. Le'ts create a new component, extract the header section into that component and use the new Avo::PanelHeaderComponent
Description
Fixes # (issue) #3421
Checklist:
Screenshots & recording