-
Notifications
You must be signed in to change notification settings - Fork 0
Update array layout style #1
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
base: main
Are you sure you want to change the base?
Changes from all commits
97b8dde
96152ea
78a4015
b5e8aee
15909be
8495fb4
c8095ba
05a620e
a77eed1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| { | ||
| "packages": ["vue2-vuetify", "example"], | ||
| "version": "3.0.0-beta.2" | ||
| "packages": [ | ||
| "vue2-vuetify", | ||
| "example" | ||
| ], | ||
| "version": "3.0.0-beta.2-cr-2" | ||
| } |
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@jsonforms/vue2-vuetify", | ||
| "version": "3.0.0-beta.2", | ||
| "name": "@yaffol/vue2-vuetify", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You also need to consume this version in the example app package.json and code to test it locally |
||
| "version": "3.0.0-beta.2-cr-2", | ||
| "description": "Vue 2 Vuetify renderers for JSON Forms", | ||
| "repository": "https://github.com/eclipsesource/jsonforms-vuetify-renderers", | ||
| "bugs": "https://github.com/eclipsesource/jsonforms/issues", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,46 +1,29 @@ | ||
| <template> | ||
| <v-card v-if="control.visible" :class="styles.arrayList.root" elevation="0"> | ||
| <v-card v-if="control.visible" :class="styles.arrayList.root"> | ||
| <v-card-title> | ||
| <v-toolbar flat :class="styles.arrayList.toolbar"> | ||
| <v-toolbar-title :class="styles.arrayList.label">{{ | ||
| computedLabel | ||
| }}</v-toolbar-title> | ||
| <validation-icon | ||
| v-if="control.childErrors.length > 0" | ||
| :errors="control.childErrors" | ||
| /> | ||
| <v-spacer></v-spacer> | ||
|
|
||
| <v-tooltip bottom> | ||
| <template v-slot:activator="{ on: onTooltip }"> | ||
| <v-btn | ||
| fab | ||
| text | ||
| elevation="0" | ||
| small | ||
| :aria-label="`Add to ${control.label}`" | ||
| v-on="onTooltip" | ||
| :class="styles.arrayList.addButton" | ||
| :disabled=" | ||
| !control.enabled || | ||
| (appliedOptions.restrict && | ||
| arraySchema !== undefined && | ||
| arraySchema.maxItems !== undefined && | ||
| control.data.length >= arraySchema.maxItems) | ||
| " | ||
| @click="addButtonClick" | ||
| > | ||
| <v-icon>mdi-plus</v-icon> | ||
| </v-btn> | ||
| </template> | ||
| {{ `Add to ${control.label}` }} | ||
| </v-tooltip> | ||
| </v-toolbar> | ||
| {{ computedLabel }} | ||
| <validation-icon | ||
| v-if=" | ||
| control.childErrors.length > 0 && | ||
| appliedOptions.showValidationOnArrayTitles | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's good to make this configurable. I would call it |
||
| " | ||
| :errors="control.childErrors" | ||
| /> | ||
| <v-spacer></v-spacer> | ||
| </v-card-title> | ||
| <v-card-text> | ||
| <v-container justify-space-around align-content-center> | ||
| <v-card-text v-if="!noData"> | ||
| <v-container | ||
| justify-space-around | ||
| align-content-center | ||
| :class="styles.arrayList.container" | ||
| > | ||
| <v-row justify="center"> | ||
| <v-expansion-panels accordion focusable v-model="currentlyExpanded"> | ||
| <v-expansion-panels | ||
| accordion | ||
| focusable | ||
| v-model="currentlyExpanded" | ||
| flat | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about forcing the |
||
| > | ||
| <v-expansion-panel | ||
| v-for="(element, index) in control.data" | ||
| :key="`${control.path}-${index}`" | ||
|
|
@@ -171,10 +154,31 @@ | |
| </v-expansion-panels> | ||
| </v-row> | ||
| </v-container> | ||
| <v-container v-if="noData" :class="styles.arrayList.noData"> | ||
| No data | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of removing this we could make it configurable or you could also just apply |
||
| </v-container></v-card-text | ||
| > | ||
| </v-card-text> | ||
| <v-card-actions class="pb-8"> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure about modifying the "new" button to the bottom for everyone. In most UIs we build it's at the top. However we could also make this configurable |
||
| <v-tooltip bottom> | ||
| <template v-slot:activator="{ on: onTooltip }"> | ||
| <v-btn | ||
| color="primary" | ||
| rounded | ||
| :aria-label="`Add to ${control.label}`" | ||
| v-on="onTooltip" | ||
| :class="styles.arrayList.addButton" | ||
| :disabled=" | ||
| !control.enabled || | ||
| (appliedOptions.restrict && | ||
| arraySchema !== undefined && | ||
| arraySchema.maxItems !== undefined && | ||
| control.data.length >= arraySchema.maxItems) | ||
| " | ||
| @click="addButtonClick" | ||
| > | ||
| <v-icon>mdi-plus</v-icon> Add new | ||
| </v-btn> | ||
| </template> | ||
| {{ `Add to ${control.label}` }} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would like to see the translation support used here, but this could also be done in a follow up |
||
| </v-tooltip> | ||
| </v-card-actions> | ||
| <v-dialog | ||
| :value="suggestToDelete !== null" | ||
| max-width="600" | ||
|
|
@@ -366,4 +370,10 @@ export const entry: JsonFormsRendererRegistryEntry = { | |
| .notranslate { | ||
| transform: none !important; | ||
| } | ||
| .v-expansion-panel-header:before { | ||
| background-color: inherit; | ||
| } | ||
|
Comment on lines
+373
to
+375
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would not add this here as discussed in the PR against @jsonforms/vuetify-renderers. |
||
| /* .v-expansion-panel::before { | ||
| box-shadow: inherit; | ||
| } */ | ||
| </style> | ||
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.
We should also adapt the
vue2-vuetifyREADME as that is the one which is shown on npm, i.e. indicate that this is a fork.