-
Notifications
You must be signed in to change notification settings - Fork 8
UI: Refactor Create Wizard Cards in Platform UI #1105
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
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,6 +1,6 @@ | ||||
| <template> | ||||
| <v-form @submit="createWiki"> | ||||
| <step-one-card | ||||
| <SiteDetailsCreateWikiWizardStep | ||||
| v-show="step === 1" | ||||
| :title="title" | ||||
| :inFlight="inFlight" | ||||
|
|
@@ -12,7 +12,7 @@ | |||
| @next-step="goToStep(2)" | ||||
| /> | ||||
|
|
||||
| <step-two-card | ||||
| <AudienceAndPurposeWizardStep | ||||
| v-show="step === 2" | ||||
| :title="title" | ||||
| :inFlight="inFlight" | ||||
|
|
@@ -22,13 +22,12 @@ | |||
| @next-step="goToStep(3)" | ||||
| /> | ||||
|
|
||||
| <step-three-card | ||||
| <TemporalityCreateWikiWizardStep | ||||
|
Contributor
Author
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. per the task description, this is the name of step 4 and not step 3. I was also a little confused when looking at this. Perhaps, this is what we want and the task description needs to be corrected.
Contributor
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. Where does the task description say that?
Contributor
Author
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 updated the task description after this comment :) . |
||||
| v-show="step === 3" | ||||
| :title="title" | ||||
| :inFlight="inFlight" | ||||
| :error="error" | ||||
| :dismissable="false" | ||||
|
Contributor
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 think this line should also go because we have now removed the dismissable logic from this card
Suggested change
|
||||
| submitButtonText="Create Wiki" | ||||
| v-model="stepThree" | ||||
| @previous-step="goToStep(2)" | ||||
| @submit="createWiki" | ||||
|
|
@@ -38,20 +37,19 @@ | |||
|
|
||||
| <script> | ||||
| import config from '~/config' | ||||
| import StepOneCard from './CreateWikiWizardStepOne.vue' | ||||
| import StepTwoCard from './CreateWikiWizardStepTwo.vue' | ||||
| import StepThreeCard from './CreateWikiWizardStepThree.vue' | ||||
| import SiteDetailsCreateWikiWizardStep from './SiteDetailsCreateWikiWizardStep.vue' | ||||
| import AudienceAndPurposeWizardStep from './AudienceAndPurposeWizardStep.vue' | ||||
| import TemporalityCreateWikiWizardStep from './TemporalityCreateWikiWizardStep.vue' | ||||
| export default { | ||||
| name: 'CreateWiki', | ||||
| components: { | ||||
| StepOneCard, | ||||
| StepTwoCard, | ||||
| StepThreeCard | ||||
| SiteDetailsCreateWikiWizardStep, | ||||
| AudienceAndPurposeWizardStep, | ||||
| TemporalityCreateWikiWizardStep | ||||
| }, | ||||
| props: [ | ||||
| 'title', | ||||
| 'buttonText' | ||||
| 'title' | ||||
| ], | ||||
| computed: { | ||||
| currentUser: function () { | ||||
|
|
@@ -90,8 +88,6 @@ export default { | |||
| } | ||||
| }, | ||||
| created () { | ||||
| // what's this for? | ||||
| // this.buttonText = this.buttonTexts.next; | ||||
| this.checkCurrentLogin() | ||||
| }, | ||||
| updated () { | ||||
|
|
||||
rosalieper marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,130 @@ | ||
| <template> | ||
| <v-card class="elevation-12"> | ||
| <v-toolbar dark color="primary"> | ||
| <v-toolbar-title>{{ title }}</v-toolbar-title> | ||
| </v-toolbar> | ||
|
|
||
| <v-card-text> | ||
| <v-form ref="inputForm" v-on:submit.prevent> | ||
| <h3>How long do you plan to use this Wikibase?</h3> | ||
|
|
||
| <v-radio-group | ||
| v-model="value.temporality" | ||
| :error-messages=error | ||
| :rules="[() => !!value.temporality || 'Please select an option.']" | ||
| > | ||
| <v-radio value="permanent" ref="test"> | ||
| <template v-slot:label> | ||
| I would prefer to keep it on a permanent basis | ||
| </template> | ||
| </v-radio> | ||
| <v-radio value="temporary"> | ||
| <template v-slot:label> | ||
| It is temporary/disposable. I will no longer need it after it served its purpose | ||
| </template> | ||
| </v-radio> | ||
|
|
||
| <v-radio value="other"> | ||
| <template v-slot:label> | ||
| Other: <v-text-field | ||
| dense | ||
| counter="200" | ||
| class="pl-1 mt-n1 mb-n2" | ||
| v-model="value.otherTemporality" | ||
| :rules=" | ||
| [ | ||
| () => value.temporality !== 'other' | ||
| || !! value.otherTemporality | ||
| || 'Please provide a response.', | ||
| () => value.temporality !== 'other' | ||
| || !! (value.otherTemporality && value.otherTemporality.length < 201) | ||
| || 'Text must be 200 characters or less.' | ||
| ]" | ||
| ></v-text-field> | ||
| </template> | ||
| </v-radio> | ||
| <v-radio value="decide_later"> | ||
| <template v-slot:label> | ||
| I will decide later | ||
| </template> | ||
| </v-radio> | ||
| </v-radio-group> | ||
| <h3 class="mt-6">Terms of Use</h3> | ||
| <div class="body-2"> | ||
| Previously accepted | ||
| <v-tooltip top> | ||
| <template v-slot:activator="{ on }"> | ||
| <a | ||
| target="_blank" | ||
| href="/terms-of-use" | ||
| @click.stop | ||
| v-on="on" | ||
| > | ||
| Terms of Use</a> | ||
| </template> | ||
| Opens in new window | ||
| </v-tooltip> still apply. | ||
| </div> | ||
| </v-form> | ||
| </v-card-text> | ||
| <v-card-actions> | ||
| <v-btn | ||
| type="button" | ||
| :disabled="inFlight" | ||
| @click="previousStep" | ||
| > | ||
| < Previous | ||
| </v-btn> | ||
|
|
||
| <v-btn | ||
| type="button" | ||
| color="primary" | ||
| :disabled="inFlight" | ||
| @click="submitWholeForm" | ||
| > | ||
| Create Wiki | ||
| </v-btn> | ||
| </v-card-actions> | ||
| </v-card> | ||
| </template> | ||
|
|
||
| <script> | ||
| export default { | ||
| name: 'TemporalityCreateWikiWizardStep', | ||
| props: { | ||
| title: String, | ||
| inFlight: Boolean, | ||
| value: Object, | ||
| error: Array | ||
| }, | ||
| methods: { | ||
| previousStep () { | ||
| if (this.value.temporality !== 'other') { | ||
| this.value.otherTemporality = undefined | ||
| } | ||
| this.$emit('previous-step') | ||
| }, | ||
| submitWholeForm () { | ||
| if (this.value.temporality !== 'other') { | ||
| this.value.otherTemporality = undefined | ||
| } | ||
| this.$refs.inputForm.validate() | ||
| if (this.$refs.inputForm.validate() === true) { | ||
| this.$emit('submit') | ||
| } | ||
| } | ||
| } | ||
| } | ||
| </script> | ||
|
|
||
| <style lang="css" scoped> | ||
| .v-card__actions { | ||
| flex-wrap: wrap; | ||
| justify-content: flex-end; | ||
| gap: 8px; | ||
| } | ||
| </style> |
Uh oh!
There was an error while loading. Please reload this page.