-
Notifications
You must be signed in to change notification settings - Fork 81
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
Refactor KBreadcrumbs to utilize KListWithOverflow #693
Comments
Hey @MisRob I want to work on this Issue Please Assign this to me |
Hey @sruthin21! Thank you! I just assigned you this issue. Please let us know if you have any question. I was thinking to propose something for this issue but probably will be able to do that tomorrow :). But you can start looking at the issue for now. |
@AlexVelezLl Thank You for assigning |
Hey @sruthin21! I am back with some things we will need for this:
There will problably be a lot of things that I am missing, so please let us know if you have any questions 🤗. |
What this throttle function do And what will be the output of the function |
This is just a way to optimize the number of calls we do to the |
@AlexVelezLl I was able to fix the first task like adding the overflowDirection prop to the KListWithOverflow Componenet |
Hey @sruthin21! Could you elaborate further on what problems you have experienced with the second point? The component should look more or less like this: <!-- KBreadcrumbs.vue -->
<KListWithOverflow
overflowDirection="start"
:items="crumbs"
>
<template #item="{ item }">
<li>
<KRouterLink
v-if="item.link"
:text="item.text"
:to="item.link"
>
<template #text="{ text }">
<span class="breadcrumbs-crumb-text">{{ text }}</span>
</template>
</KRouterLink>
<span v-else>{{ item.text }}</span>
</li>
</template>
<template #more="{ overflowItems }">
<KIconButton
size="small"
icon="chevronUp"
appearance="raised-button"
>
<template #menu>
<KDropdownMenu
:options="overflowItems"
/>
</template>
</KIconButton>
<span>
›
</span>
</template>
</KListWithOverflow> So the
For this you can see the Acceptance creteria in the issue description:
So basically as this is a refactor, the output should look exactly the same as it is right now, and we should make sure that we dont introduce bugs on something there was already working ok. We can check regressions in studio, and you can do it in Kolibri and in the docs pages. to test your changes in Kolibri you can check the how to preview updates in a product guide. |
@AlexVelezLl I have made a pull request review it I know there are lots of changes to do |
Note the conversation above and the first attempt #790. Quite detailed review by @AlexVelezLl will serve as good guidance |
Hey @MisRob I want to work on this issue. Please Assign this to me |
Hi @shruti862, sure! Thank you. Note this is a bit more complex, but we already had one attempt and it was reviewed, so please check out the comments above as guidance. |
@MisRob I am done with the task-1 of the issue but i am facing issue in refactoring KBreadcrumb with updated KListWithOverflow ; I am unable to render '>' separator between items and to insert link in the text of dropdown menu in KBreadcrumb . Could you please review my code so that i get to know what i am doing wrong.I am raising a PR soon. |
Hi @shruti862, thanks! I converted your pull request to draft until it's finalized.
In your pull request, would you comment on some particular places that are related to this and be as specific as possible? We will need to hear more to understand what you're experiencing. |
@MisRob yes sure . I am facing issue in lib/KBreadcrumb.vue file ,I will make comments on this file regarding the issues i am facing. |
Great @shruti862. I will invite @AlexVelezLl to assist there. The more information you can provide in the draft PR, the better. Thanks a lot for this work! |
Hi @shruti862, I wanted to mention that Learning Equality will be closed from December 23 to January 5. |
🌱 Are you new to the codebase? Welcome! Please see the contributing guidelines.
In times when
KListWithOverflow
component didn't yet exist, we used the "duplicate markup" technique in theKBreadcrumbs
component to achieve their overflow behavior when breadcrumb items were collapsed to the dropdown menu on the left:The duplicate markup technique is based on keeping a hidden copy of visible breadcrumbs (
breadcrumbs-offscreen
) in the markup so that elements are available for recalculations:kolibri-design-system/lib/KBreadcrumbs.vue
Lines 84 to 118 in 9d2a147
Now that we have
KListWithOverflow
that is designed to take care of overflowing items to a menu, it would be good to remove this other implementation fromKBreadcrumbs
and refactor them to utilizeKListWithOverflow
instead.The Value Add
Easier maintenance, development efficiency.
Guidance
Note that
KListWithOverflow
will likely need some updates to be able to display the button on the left side, and possibly some other adjustments so that these two components can collaborate smoothly.Acceptance criteria
KBreadcrumbs
andKListWithOverflow
are used:The text was updated successfully, but these errors were encountered: