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

[Component]: Breadcrumb Component (Work in progress) #861

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from

Conversation

mouadTaoussi
Copy link
Contributor

@mouadTaoussi mouadTaoussi commented Mar 24, 2024

Fixes #862

Proposed Changes

Copy link

netlify bot commented Mar 24, 2024

Deploy Preview for oruga-documentation-preview failed.

Name Link
🔨 Latest commit 49d619a
🔍 Latest deploy log https://app.netlify.com/sites/oruga-documentation-preview/deploys/66925a2ff2f5db00088fb332

@mouadTaoussi mouadTaoussi changed the title [Component]: Breadcrumb Component (Work on progress) [Component]: Breadcrumb Component (Work in progress) Mar 24, 2024
Copy link

codecov bot commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 105 lines in your changes missing coverage. Please review.

Project coverage is 17.61%. Comparing base (484cfe8) to head (a037ab6).
Report is 120 commits behind head on develop.

Current head a037ab6 differs from pull request most recent head b99948d

Please upload reports for the commit b99948d to get more accurate results.

Files Patch % Lines
.../src/components/breadcrumb/examples/separators.vue 0.00% 20 Missing ⚠️
...oruga/src/components/breadcrumb/BreadcrumbItem.vue 0.00% 15 Missing and 3 partials ⚠️
...a/src/components/breadcrumb/examples/inspector.vue 0.00% 13 Missing ⚠️
...oruga/src/components/breadcrumb/examples/icons.vue 0.00% 12 Missing ⚠️
...a/src/components/breadcrumb/examples/positions.vue 0.00% 12 Missing ⚠️
...oruga/src/components/breadcrumb/examples/sizes.vue 0.00% 12 Missing ⚠️
...ges/oruga/src/components/breadcrumb/Breadcrumb.vue 0.00% 10 Missing ⚠️
...oruga/src/components/breadcrumb/examples/index.vue 0.00% 5 Missing ⚠️
packages/oruga/src/components/breadcrumb/index.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #861       +/-   ##
============================================
- Coverage    56.71%   17.61%   -39.11%     
============================================
  Files           30      301      +271     
  Lines         1511     7420     +5909     
  Branches       544     2126     +1582     
============================================
+ Hits           857     1307      +450     
- Misses         654     5160     +4506     
- Partials         0      953      +953     
Flag Coverage Δ
oruga-next 17.61% <0.00%> (-39.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mouadTaoussi mouadTaoussi marked this pull request as draft March 24, 2024 16:39
},
align: {
type: String,
default: getOption("breadcrumb.size"),
Copy link
Member

Choose a reason for hiding this comment

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

wrong config path

/**
* This is used internally
* @ignore
*/
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary command


// --- Computed Component Classes ---
const computedTag = computed(() => {
return props.tag ? props.tag : "ul";
Copy link
Member

Choose a reason for hiding this comment

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

Why not provide a default?
You can do default: () => getOption("breadcrumb.tag", "ul"),

"separatorClass",
"o-breadcrumb--",
computed(() => props.separator),
computed(() => !!props.separator),
Copy link
Member

Choose a reason for hiding this comment

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

What is the separator class for? I would think of a class on the separator element, but not on the root with a suffix.

},
tag: {
type: String,
default: () => getOption("breadcrumb.tag"),
Copy link
Member

Choose a reason for hiding this comment

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

Please define the tag as similar to other components:

tag: {
type: [String, Object, Function] as PropType,
default: () => getOption("breadcrumb.tag", "li"),
},

// },
disabled: {
type: String,
default: () => getOption("breadcrumb.disabled"),
Copy link
Member

Choose a reason for hiding this comment

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

Should this be a boolean?

:icon="iconLeft"
:both="iconBoth"
:class="[...iconClasses, ...iconLeftClasses]" />
<slot></slot>
Copy link
Member

Choose a reason for hiding this comment

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

I would consider the sperator to be some html element.

<template>
<component :is="computedTag" :class="rootClasses" data-oruga="breadcrumb">
<!-- BreadcrumbItems -->
<slot></slot>
Copy link
Member

Choose a reason for hiding this comment

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

I would like to use the component like

const route = useRoute();
<o-breadcrumb :route="route" />

And the component would render the current route with its breadcumb items.

@mlmoravek
Copy link
Member

mlmoravek commented Apr 22, 2024

Feel free to reopen it when you have further development to show. I would also prefer that you open a PR on your fork first, if you want me to have a look. Otherwise it would be cleaner to reopen this when it is ready.
You can get in touch with me on Discord.

@mlmoravek mlmoravek closed this Apr 22, 2024
@mlmoravek mlmoravek reopened this May 5, 2024
@mouadTaoussi mouadTaoussi marked this pull request as ready for review May 5, 2024 18:17
Copy link
Member

Choose a reason for hiding this comment

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

Remove these fieles


import { registerComponent } from "@/utils/plugins";

/** export button plugin */
Copy link
Member

Choose a reason for hiding this comment

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

wrong comment

override: { type: Boolean, default: undefined },
/**
* Color variant of the breadcrumb
* @values primary, info, success, warning, danger, and any other custom color
Copy link
Member

Choose a reason for hiding this comment

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

unused doc comment

* Icon pack to use
* @values mdi, fa, fas and any other custom icon pack
*/

Copy link
Member

Choose a reason for hiding this comment

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

fomatting - unnecessary empty lines

type: [String, Array, Function] as PropType<ComponentClass>,
default: undefined,
},
iconBoth: { 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.

missing js doc and its not a class prop -> move more up

});

// --- Computed Component Classes ---
const computedTag = computed(() => {
Copy link
Member

Choose a reason for hiding this comment

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

Why having a prop default and a computed? computed is not necessary

package.json Outdated
@@ -34,5 +34,8 @@
"conventional-changelog": "^5.1.0",
"conventional-changelog-cli": "^4.1.0",
"replace-in-file": "^7.1.0"
},
"dependencies": {
"jest-axe": "^8.0.0"
Copy link
Member

Choose a reason for hiding this comment

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

Thats wrong here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Component]: Breadcrumb
2 participants