-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
base: develop
Are you sure you want to change the base?
Conversation
❌ Deploy Preview for oruga-documentation-preview failed.
|
Codecov ReportAttention: Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
}, | ||
align: { | ||
type: String, | ||
default: getOption("breadcrumb.size"), |
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.
wrong config path
/** | ||
* This is used internally | ||
* @ignore | ||
*/ |
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.
Unnecessary command
|
||
// --- Computed Component Classes --- | ||
const computedTag = computed(() => { | ||
return props.tag ? props.tag : "ul"; |
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.
Why not provide a default?
You can do default: () => getOption("breadcrumb.tag", "ul"),
"separatorClass", | ||
"o-breadcrumb--", | ||
computed(() => props.separator), | ||
computed(() => !!props.separator), |
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.
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"), |
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.
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"), |
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.
Should this be a boolean?
:icon="iconLeft" | ||
:both="iconBoth" | ||
:class="[...iconClasses, ...iconLeftClasses]" /> | ||
<slot></slot> |
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.
I would consider the sperator to be some html element.
<template> | ||
<component :is="computedTag" :class="rootClasses" data-oruga="breadcrumb"> | ||
<!-- BreadcrumbItems --> | ||
<slot></slot> |
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.
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.
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.
Remove these fieles
|
||
import { registerComponent } from "@/utils/plugins"; | ||
|
||
/** export button plugin */ |
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.
wrong comment
override: { type: Boolean, default: undefined }, | ||
/** | ||
* Color variant of the breadcrumb | ||
* @values primary, info, success, warning, danger, and any other custom color |
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.
unused doc comment
* Icon pack to use | ||
* @values mdi, fa, fas and any other custom icon pack | ||
*/ | ||
|
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.
fomatting - unnecessary empty lines
type: [String, Array, Function] as PropType<ComponentClass>, | ||
default: undefined, | ||
}, | ||
iconBoth: { type: Boolean, default: false }, |
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.
missing js doc and its not a class prop -> move more up
}); | ||
|
||
// --- Computed Component Classes --- | ||
const computedTag = computed(() => { |
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.
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" |
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.
Thats wrong here!
Fixes #862
Proposed Changes