Skip to content

Commit

Permalink
feat(OUIA): te pf-dropdown component assigns ouia attributes to the…
Browse files Browse the repository at this point in the history
… menu dropdown element
  • Loading branch information
mtorromeo committed May 26, 2022
1 parent 3a6ff51 commit ae7266f
Show file tree
Hide file tree
Showing 3 changed files with 276 additions and 253 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [0.3.5] - 2022-06-25
### Added
- feat(OUIA): te `pf-dropdown` component assigns ouia attributes to the menu dropdown element.

## [0.3.4] - 2022-04-29
### Fixed
- fix(OUIA): restored ouia type `V-PF3/` prefix.
Expand Down Expand Up @@ -415,7 +419,8 @@ disabled, as per PatternFly design guidelines.
- `pf-toolbar` component
- `pf-utilization-bar-chart` component

[Unreleased]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.4...HEAD
[Unreleased]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.5...HEAD
[0.3.5]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.4...v0.3.5
[0.3.4]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.3...v0.3.4
[0.3.3]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.2...v0.3.3
[0.3.2]: https://github.com/mtorromeo/vue-patternfly/compare/v0.3.1...v0.3.2
Expand Down
13 changes: 11 additions & 2 deletions src/components/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</slot> <span v-show="!noCaret" class="caret" />
</button>

<ul ref="dropdown" :class="{'dropdown-menu-right': menuRight}" class="dropdown-menu">
<ul ref="dropdown" v-bind="ouiaMenuProps" :class="{'dropdown-menu-right': menuRight}" class="dropdown-menu">
<slot />
</ul>
</component>
Expand Down Expand Up @@ -64,15 +64,24 @@ export default defineComponent({
default: '',
},
noCaret: Boolean,
...ouiaProps,
ouiaMenuId: ouiaProps.ouiaId,
ouiaMenuSafe: ouiaProps.ouiaSafe,
},
emits: {
'update:modelValue': (value: boolean) => value !== undefined,
},
setup(props) {
return useOUIAProps(props);
return {
...useOUIAProps(props),
ouiaMenuProps: useOUIAProps({
ouiaId: props.ouiaMenuId,
ouiaSafe: props.ouiaMenuSafe,
}, { name: 'Dropdown/Menu' }).ouiaProps,
};
},
data(this: void) {
Expand Down
Loading

0 comments on commit ae7266f

Please sign in to comment.