-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactored Navigation component to use type
instead of dropdown
prop.
#113
Conversation
…wn type is set to 'None'.
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.
@joshua-salsadigital
Can we somehow reverse this so that bey default the level 0 is always displayed, even if there are no classes.
And the grid
display is added only for other variants.
here is the problem space: footer, for example, may have nav items displayed vertically stacked or inline Option 1 Option 2 Option 3 Option 4 In consumer (Drupal): {% if in_sidebar %}
{% include '@organisms/side-navigation/side-navigation.twig' with {
theme: 'light',
items,
modifier_class: 'ct-primary-navigation',
} only %}
{% else %}
{% include '@organisms/navigation/navigation.twig' with {
theme,
items,
type: dropdown == 'none' ? 'inline' : dropdown, <------- THIS
dropdown_columns,
dropdown_columns_fill,
is_animated,
menu_id,
modifier_class: 'ct-primary-navigation ct-justify-content-end',
} only %}
{% endif %} After some considerations, we are going to proceed with Option 4: Update the prop in UIKit and re-map it in consumer site to force Solution direction
After the PR is merged, raise a PR in the Drupal implementation:
Do not update the possible values of the |
@joshua-salsadigital Could you please identify the reason for this change and update styles accordingly. |
|
5246ae0
to
0fd1b29
Compare
type
instead of dropdown
.
type
instead of dropdown
.type
instead of dropdown
prop.
Regression fix: #94
Checklist before requesting a review
as
[#123] Verb in past tense with a period at the end.
Changed
section about WHY something wasdone if this was a bespoke implementation.
and they have passed.
dropdown
prop was too limiting and only controlled the dropdown type. But there are cases when theNavigation
component is used withoutdropdown
and in another way (as inline horizontal list of links). In order to make the component more extendable,dropdown
was changed totype
and now allows to:none
is selected.Footer
component uses this to show links.inline
is selected.dropdown
is selected.drawer
is selected.Changed
type
instead ofdropdown
prop.Screenshots