Skip to content
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

Override constrainToScroll prop default value to false #586

Merged
merged 32 commits into from
Mar 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5d0e433
Override constrainToScroll prop default value to false
kafukoM Mar 21, 2024
f1b8ee0
Updated default constrainToScrollParent prop value
kafukoM Mar 22, 2024
837d6e2
Reverted yarn.lock changes
kafukoM Mar 22, 2024
44409f6
Modified changelog.md
kafukoM Mar 22, 2024
ec8cf3b
Revert "Modified changelog.md"
kafukoM Mar 22, 2024
996d695
Updated CHANGELOG.md
kafukoM Mar 22, 2024
b577fa8
Move dimension styles to the container
MisRob Jul 26, 2023
f9fcaf0
Add scaling and ratio logic
MisRob Jul 26, 2023
8ea6972
Document default slot
MisRob Nov 22, 2023
e358e4b
Add slots and placeholder logic
MisRob Nov 22, 2023
3d3107a
Add border radius
MisRob Jan 12, 2024
1b51e44
Cleanup documentation and tests
MisRob Jan 31, 2024
86a55a3
Trying with hidden overflow flex wrapper
AlexVelezLl Feb 20, 2024
3f55c9e
Overflow items with visibility hidden items
AlexVelezLl Feb 20, 2024
98018f4
Ensuring all visible items if moreButton were not rendered
AlexVelezLl Feb 20, 2024
bcf6fa2
Polishing example
AlexVelezLl Feb 20, 2024
ce80b6a
Add docs page
AlexVelezLl Feb 21, 2024
4b20918
Add divider support
AlexVelezLl Feb 21, 2024
add2f37
Add appearance overrides
AlexVelezLl Feb 21, 2024
5f9fd92
Add useKResponsiveElement
AlexVelezLl Feb 27, 2024
4ad6e9d
Watch responsive elementWidth in KListWithOverflow
AlexVelezLl Feb 27, 2024
4c0850d
Update docs
AlexVelezLl Feb 27, 2024
e3cfdb3
Add component documentation
AlexVelezLl Feb 27, 2024
691b74a
Add changelog
AlexVelezLl Feb 27, 2024
f3690dd
Lint files
AlexVelezLl Feb 27, 2024
e24ea56
Rename composable to private
AlexVelezLl Feb 27, 2024
5f25479
Set list as overflow hidden
AlexVelezLl Feb 27, 2024
b4d4ea2
Replace ResizeSensor
AlexVelezLl Feb 28, 2024
f8b5ef8
Requested changes
AlexVelezLl Feb 29, 2024
76c72de
Increase version
MisRob Mar 5, 2024
8dbb67b
Resolved CHANGELOG.md conflicts
kafukoM Mar 22, 2024
883ab3d
Merge branch 'release-v3' into kdropdown-options-update
kafukoM Mar 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/KDropdownMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:z-index="99"
:containFocus="true"
:dropdownPosition="position"
:constrainToScrollParent="constrainToScrollParent"
@close="handleClose"
@open="handleOpen"
>
Expand Down Expand Up @@ -34,6 +35,11 @@
UiMenu,
},
props: {
// Override default prop value
Copy link
Member

@akolson akolson Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace this comment with documentation instead

/**
 * The dropdown menu popover flips its position to avoid overflows within the parent. Setting it to false disables the flipping behavior.
 */

@MisRob, happy to hear your thoughts if this developer friendly language :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That'd be helpful documentation definitely, thank you

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback @akolson. I have made the requested changes in the latest commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean I have to submit another PR showcasing the override for the template in Kolibiri rendering the KDropdownMenu component?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we could start by overriding the value in Kolibri: Facility Settings, where the bug was initially caught. Please see #432 for specifics. You can test your KDS changes locally in kolibri by running

yarn run devserver-with-kds /path/to/your/local/kolibri-design-system

The rest of the overrides will be done as and when its needed.

constrainToScrollParent: {
type: Boolean,
default: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, I think this needs to default to true as is with Keen UI. We can then override the default if we need to by passing false. This will also ensure that we are backward compatible too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are also, 1 or 2 linting issues to take care of. You can fix any linting issues by running yarn run lint-fix before adding and committing your changes

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For changelog build failures, please copy the changelog below(I made a few changes to your changelog from the pr) and add it to the CHANGELOG.md just below the ## Version 3.x.x (release-v3 branch) section as the latest entry, since your fix is targeting release-v3

- [#586]
  - **Description:** Adds a new prop `constrainToScrollParent ` to `KDropdownMenu` to allow overriding of its popover flipping behavior.
  - **Products impact:** Bugfix
  - **Addresses:** [#432](https://github.com/learningequality/kolibri-design-system/issues/432)
  - **Components:** KDropdownMenu
  - **Breaking:** no
  - **Impacts a11y:**  no
  - **Guidance:** Use the `constrainToScrollParent` prop to override the default popover flipping behavior of the `KDropdownMenu` component prop where necessary.

[#586]: https://github.com/learningequality/kolibri-design-system/pull/586

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please be sure to let me know in case you need any support in the process. Thanks again

},
/**
* An array of options objects, with one object per dropdown item
*/
Expand Down
Loading