From 93966de3905e3fde8c1661755f8a73ffdfb3a636 Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:02:57 +0200 Subject: [PATCH 001/132] Create CONTRIBUTING.md --- CONTRIBUTING.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..bc375525 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing guidelines + +We welcome any kind of contribution to our software, from simple comment or question to a full fledged [pull request](https://help.github.com/articles/about-pull-requests/). Please read and follow our Code of Conduct [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md). + +A contribution can be one of the following cases: + +- you have a question; +- you think you may have found a bug (including unexpected behavior); +- you want to make some kind of change to the code base (e.g. to fix a bug, to add a new feature, to update documentation). + +The sections below outline the steps in each case. + +## You have a question + + +- use the search functionality [here](https://github.com/citation-file-format/cff-initializer-javascript/issues) to see if someone already filed the same issue; +- if your issue search did not yield any relevant results, make a new issue; +- apply the "Question" label; apply other labels when relevant. + +## You think you may have found a bug + + +- use the search functionality [here](https://github.com/citation-file-format/cff-initializer-javascript/issues) to see if someone already filed the same issue; +- if your issue search did not yield any relevant results, make a new issue, making sure to provide enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include: + - the [SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) of the commit that is causing your problem; + - some identifying information (name and version number) for dependencies you're using; + - information about the operating system; +- apply relevant labels to the newly created issue. + +## You want to make some kind of change to the code base + + +- (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue; +- (**important**) wait until some kind of consensus is reached about your idea being a good idea; +- if needed, fork the repository to your own Github profile and create your own feature branch off of the latest master commit. While working on your feature branch, make sure to stay up to date with the master branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions [here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and [here](https://help.github.com/articles/syncing-a-fork/); +- if cloned locally then perform a `development installation `_; +- make sure the existing unit tests still work by running ``npm run test:unit:ci``; +- make sure all the workflows (Github Action) pass; +- add your own tests (if necessary); +- update or expand the developer documentation; +- [push](http://rogerdudler.github.io/git-guide/) your feature branch to (your fork of) the cff-initializer-javascript repository on GitHub; +- create the pull request, e.g. following the instructions [here](https://help.github.com/articles/creating-a-pull-request/). + +In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request. From 94c11c92d2c0780e56c32161af3e1456ed1b6b45 Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:07:47 +0200 Subject: [PATCH 002/132] Update CONTRIBUTING.md --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc375525..8396f8d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,6 @@ The sections below outline the steps in each case. - (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue; - (**important**) wait until some kind of consensus is reached about your idea being a good idea; - if needed, fork the repository to your own Github profile and create your own feature branch off of the latest master commit. While working on your feature branch, make sure to stay up to date with the master branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions [here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and [here](https://help.github.com/articles/syncing-a-fork/); -- if cloned locally then perform a `development installation `_; - make sure the existing unit tests still work by running ``npm run test:unit:ci``; - make sure all the workflows (Github Action) pass; - add your own tests (if necessary); From 7c6736a5edee81bfb060533426107efee30a5359 Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:11:15 +0200 Subject: [PATCH 003/132] Create CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 73 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 00000000..c64d5a96 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,73 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +education, socio-economic status, nationality, personal appearance, race, +religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at generalization@esciencecenter.nl. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html From 0756dd22fe08f254a2451e1862d2fa3b3ce62a8a Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:17:12 +0200 Subject: [PATCH 004/132] Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a8612dcf..a5d23f87 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,8 +1,15 @@ # Pull request details +As a contributor I confirm, +- [ ] I read and followed the instructions in [CONTRIBUTING.md](CONTRIBUTING.md) +- [ ] The developer documentation is up to date with the changes introduced in this Pull Request +- [ ] Tests are passing +- [ ] All the workflows are passing + ## List of related issues or pull requests -Refs: #ISSUE_NUMBER +Refs: +- #ISSUE_NUMBER ## Describe the changes made in this pull request From e3cdb398d44a4489a2e2631ff031450d0579d803 Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:17:27 +0200 Subject: [PATCH 005/132] Update PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a5d23f87..53a3c690 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,6 @@ # Pull request details -As a contributor I confirm, +As a contributor I confirm - [ ] I read and followed the instructions in [CONTRIBUTING.md](CONTRIBUTING.md) - [ ] The developer documentation is up to date with the changes introduced in this Pull Request - [ ] Tests are passing From 13ca53de828189ec51cbe71c9cb101bf79ffdb6a Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:22:08 +0200 Subject: [PATCH 006/132] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 4778c8b4..bd64290a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,13 @@ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1404735.svg)](https://doi.org/10.5281/zenodo.1404735) + [![Build](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml) + [![Lint](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml) + [![Preview](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/preview.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/preview.yml) + [![Publish](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/publish.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/publish.yml) + [![Test](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml) + [![cffconvert](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/cffconvert.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/cffconvert.yml) + [![zenodraft](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/zenodraft.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/zenodraft.yml) + # cffinit: a web form to initialize CITATION.cff files - Check out the **live version** [here](https://citation-file-format.github.io/cff-initializer-javascript/). From fbbfda4460c129fbaae9663a8770e4bd3e7b641e Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 14:30:35 +0200 Subject: [PATCH 007/132] Update README.md --- README.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bd64290a..84251740 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,21 @@ [![cffconvert](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/cffconvert.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/cffconvert.yml) [![zenodraft](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/zenodraft.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/zenodraft.yml) -# cffinit: a web form to initialize CITATION.cff files +# cffinit: a web application to create CITATION.cff files -- Check out the **live version** [here](https://citation-file-format.github.io/cff-initializer-javascript/). -- For the rationale behind CITATION.cff files, read [the blog](https://www.software.ac.uk/blog/2017-12-12-standard-format-citation-files). +## What cffinit can do for you? +When you made some software and you want to include instructions on how to cite it, CITATION.cff files are the answer. However, sometimes it's tricky to ensure you write valid CFF. This tool helps mitigate that problem by generating the CFF text using a web form with form validation and user feedback. + +## Information for users +- Check out the **live version** at . +- For the rationale behind CITATION.cff files, you can read more here: + - . + - + - - For the Citation File Format specification, go [here](https://github.com/citation-file-format/citation-file-format) (latest) or [here](https://doi.org/10.5281/zenodo.1003149) (stable). - For the Citation File Format home page, go [here](https://citation-file-format.github.io). + +## Information for developers + +- If you want to know how you can contribute, please have a look at [the current issues](https://github.com/citation-file-format/cff-initializer-javascript/issues) and read [CONTRIBUTING.md](CONTRIBUTING.md) +- Developer documentation can be found in [README.dev.md](README.dev.md) From e0b5285cffaac0e94db60bb55b869fa8180faa59 Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:38:54 +0200 Subject: [PATCH 008/132] Apply suggestions from code review Co-authored-by: Abel Soares Siqueira --- CONTRIBUTING.md | 22 ++++++++++------------ README.md | 6 ++---- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8396f8d9..2b5c1475 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,32 +12,30 @@ The sections below outline the steps in each case. ## You have a question - - use the search functionality [here](https://github.com/citation-file-format/cff-initializer-javascript/issues) to see if someone already filed the same issue; - if your issue search did not yield any relevant results, make a new issue; -- apply the "Question" label; apply other labels when relevant. ## You think you may have found a bug - - use the search functionality [here](https://github.com/citation-file-format/cff-initializer-javascript/issues) to see if someone already filed the same issue; - if your issue search did not yield any relevant results, make a new issue, making sure to provide enough information to the rest of the community to understand the cause and context of the problem. Depending on the issue, you may want to include: - - the [SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) of the commit that is causing your problem; + - the version of cffinit (bottom right in the app); + - if you are using a development version, the [SHA hashcode](https://help.github.com/articles/autolinked-references-and-urls/#commit-shas) of the commit that is causing your problem; - some identifying information (name and version number) for dependencies you're using; - information about the operating system; -- apply relevant labels to the newly created issue. ## You want to make some kind of change to the code base - - (**important**) announce your plan to the rest of the community *before you start working*. This announcement should be in the form of a (new) issue; -- (**important**) wait until some kind of consensus is reached about your idea being a good idea; -- if needed, fork the repository to your own Github profile and create your own feature branch off of the latest master commit. While working on your feature branch, make sure to stay up to date with the master branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions [here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and [here](https://help.github.com/articles/syncing-a-fork/); -- make sure the existing unit tests still work by running ``npm run test:unit:ci``; -- make sure all the workflows (Github Action) pass; +- (**important**) wait until some kind of consensus is reached about your idea being implemented; +- if needed, fork the repository to your own Github profile and create your own feature branch off of the latest main commit. While working on your feature branch, make sure to stay up to date with the main branch by pulling in changes, possibly from the 'upstream' repository (follow the instructions [here](https://help.github.com/articles/configuring-a-remote-for-a-fork/) and [here](https://help.github.com/articles/syncing-a-fork/); +- read the [developer documentation](README.dev.md); +- make sure the existing tests still work; - add your own tests (if necessary); - update or expand the developer documentation; - [push](http://rogerdudler.github.io/git-guide/) your feature branch to (your fork of) the cff-initializer-javascript repository on GitHub; -- create the pull request, e.g. following the instructions [here](https://help.github.com/articles/creating-a-pull-request/). +- create the pull request, e.g. following the instructions [here](https://help.github.com/articles/creating-a-pull-request/); +- verify that the GitHub workflows passed (if they don't, mark the PR as a draft while you fix it); +- don't request reviews, the reviewer will assign them themselves. -In case you feel like you've made a valuable contribution, but you don't know how to write or run tests for it, or how to generate the documentation: don't let this discourage you from making the pull request; we can help you! Just go ahead and submit the pull request, but keep in mind that you might be asked to append additional commits to your pull request. +If you don't know how to write or run tests or generate documentation, don't let this discourage you; we can help! Ask for help on the relevant issue so we can decide how to proceed. diff --git a/README.md b/README.md index 84251740..a7636e19 100644 --- a/README.md +++ b/README.md @@ -2,18 +2,16 @@ [![Build](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml) [![Lint](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml) - [![Preview](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/preview.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/preview.yml) - [![Publish](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/publish.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/publish.yml) [![Test](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml) - [![cffconvert](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/cffconvert.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/cffconvert.yml) - [![zenodraft](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/zenodraft.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/zenodraft.yml) # cffinit: a web application to create CITATION.cff files ## What cffinit can do for you? + When you made some software and you want to include instructions on how to cite it, CITATION.cff files are the answer. However, sometimes it's tricky to ensure you write valid CFF. This tool helps mitigate that problem by generating the CFF text using a web form with form validation and user feedback. ## Information for users + - Check out the **live version** at . - For the rationale behind CITATION.cff files, you can read more here: - . From 611fde79e7703f6baf1b9c1355ed6b72df84dbce Mon Sep 17 00:00:00 2001 From: fdiblen <144492+fdiblen@users.noreply.github.com> Date: Thu, 25 Aug 2022 16:40:08 +0200 Subject: [PATCH 009/132] Update README.md --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a7636e19..85b9d818 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ -[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1404735.svg)](https://doi.org/10.5281/zenodo.1404735) - - [![Build](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml) - [![Lint](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml) - [![Test](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml) - # cffinit: a web application to create CITATION.cff files +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1404735.svg)](https://doi.org/10.5281/zenodo.1404735) +[![Build](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/ghpages.yml) +[![Lint](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/lint.yml) +[![Test](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml/badge.svg)](https://github.com/citation-file-format/cff-initializer-javascript/actions/workflows/test.yml) + ## What cffinit can do for you? When you made some software and you want to include instructions on how to cite it, CITATION.cff files are the answer. However, sometimes it's tricky to ensure you write valid CFF. This tool helps mitigate that problem by generating the CFF text using a web form with form validation and user feedback. From 8d19d8dc4cf4b6bae80dedea413db6bda32f2ca8 Mon Sep 17 00:00:00 2001 From: Reggie Cushing Date: Fri, 26 Aug 2022 11:47:31 +0200 Subject: [PATCH 010/132] bind width to a model to get around vue warning --- src/components/LayoutStepper.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/LayoutStepper.vue b/src/components/LayoutStepper.vue index 586b400f..91f2a7e0 100644 --- a/src/components/LayoutStepper.vue +++ b/src/components/LayoutStepper.vue @@ -11,7 +11,7 @@ overlay side="right" v-model="isPreviewDrawerEnabled" - width="600" + v-model:width="width" >
{ const currentPath = useRoute().path return currentPath !== '/finish-minimum' && currentPath !== '/finish-advanced' }), + width, isPreviewDrawerEnabled, onTogglePreview: () => { isPreviewDrawerEnabled.value = !isPreviewDrawerEnabled.value } } From 1ae44c39614ea8bc324726d12bb5f2632230006f Mon Sep 17 00:00:00 2001 From: Reggie Cushing Date: Fri, 26 Aug 2022 11:52:42 +0200 Subject: [PATCH 011/132] use bind instead of model --- src/components/LayoutStepper.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LayoutStepper.vue b/src/components/LayoutStepper.vue index 91f2a7e0..7c3869ca 100644 --- a/src/components/LayoutStepper.vue +++ b/src/components/LayoutStepper.vue @@ -11,7 +11,7 @@ overlay side="right" v-model="isPreviewDrawerEnabled" - v-model:width="width" + v-bind:width="width" >
Date: Fri, 26 Aug 2022 12:20:22 +0200 Subject: [PATCH 012/132] use literal instead of variable --- src/components/LayoutStepper.vue | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/LayoutStepper.vue b/src/components/LayoutStepper.vue index 7c3869ca..8084c524 100644 --- a/src/components/LayoutStepper.vue +++ b/src/components/LayoutStepper.vue @@ -11,7 +11,7 @@ overlay side="right" v-model="isPreviewDrawerEnabled" - v-bind:width="width" + v-bind:width="600" >
{ const currentPath = useRoute().path return currentPath !== '/finish-minimum' && currentPath !== '/finish-advanced' }), - width, isPreviewDrawerEnabled, onTogglePreview: () => { isPreviewDrawerEnabled.value = !isPreviewDrawerEnabled.value } } From 21bec90d78f4b6d10ece66991cc98b6aa59cfe3b Mon Sep 17 00:00:00 2001 From: Reggie Cushing Date: Thu, 25 Aug 2022 10:54:29 +0200 Subject: [PATCH 013/132] adding fill width for download and add more button --- src/components/DownloadButton.vue | 5 ++++- src/components/ScreenFinishMinimum.vue | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/DownloadButton.vue b/src/components/DownloadButton.vue index 7c38c0cb..e87e3bf2 100644 --- a/src/components/DownloadButton.vue +++ b/src/components/DownloadButton.vue @@ -8,12 +8,14 @@ type="a" download="CITATION.cff" v-bind:href="downloadUrl" + v-bind:class="$q.platform.is.mobile ? 'full-width' : ''" /> From 0bf0be6896063329cbaa6e8745fb2c37426f4c65 Mon Sep 17 00:00:00 2001 From: Abel Soares Siqueira Date: Mon, 29 Aug 2022 14:32:54 +0200 Subject: [PATCH 039/132] Remove tooltips from author card --- src/components/AuthorCardEditing.vue | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/components/AuthorCardEditing.vue b/src/components/AuthorCardEditing.vue index 17fb8270..d642cf2f 100644 --- a/src/components/AuthorCardEditing.vue +++ b/src/components/AuthorCardEditing.vue @@ -25,7 +25,6 @@ label="given-names" outlined standout - title="The person's given names." v-bind:model-value="givenNames" v-bind:error="false" v-bind:error-message="''" @@ -52,7 +51,6 @@ label="name-particle" outlined standout - title="The person's name particle, e.g., a nobiliary particle or a [preposition] meaning 'of' or 'from' (for example 'von' in 'Alexander von Humboldt')." v-bind:model-value="nameParticle" v-bind:error="false" v-bind:error-message="''" @@ -65,7 +63,6 @@ label="family-names" outlined standout - title="The person's family names." v-bind:model-value="familyNames" v-bind:error="false" v-bind:error-message="''" @@ -78,7 +75,6 @@ label="name-suffix" outlined standout - title="The person's name suffix, e.g. 'Jr.' for Sammy Davis Jr. or 'III' for Frank Edwin Wright III." v-bind:model-value="nameSuffix" v-bind:error="false" v-bind:error-message="''" @@ -105,7 +101,6 @@ label="email" outlined standout - title="The person's email address." type="email" v-bind:model-value="email" v-bind:class="emailErrors.length > 0 ? 'has-error' : ''" @@ -144,7 +139,6 @@ label="affiliation" outlined standout - title="The person's affiliation." v-bind:model-value="affiliation" v-bind:error="false" v-bind:error-message="''" @@ -159,7 +153,6 @@ mask="https://orcid.org/####-####-####-###X" outlined standout - title="The person's ORCID identifier." v-bind:class="orcidErrors.length > 0 ? 'has-error' : ''" v-bind:model-value="orcid" v-bind:error="orcidErrors.length > 0" From 28a52e5305ab6b0200c8139a20f8f1f332899191 Mon Sep 17 00:00:00 2001 From: Faruk D Date: Mon, 29 Aug 2022 15:45:00 +0200 Subject: [PATCH 040/132] add confirmation dialog to reset the form --- src/components/ScreenFinishAdvanced.vue | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/components/ScreenFinishAdvanced.vue b/src/components/ScreenFinishAdvanced.vue index a1837ecc..1320ae8b 100644 --- a/src/components/ScreenFinishAdvanced.vue +++ b/src/components/ScreenFinishAdvanced.vue @@ -33,7 +33,7 @@ icon="refresh" label="Reset form" no-caps - v-on:click="createAnother" + v-on:click="confirmAndReset" />
@@ -51,6 +51,7 @@ import DownloadButton from 'components/DownloadButton.vue' import { useApp } from 'src/store/app' import { useCff } from 'src/store/cff' import { useStepperErrors } from 'src/store/stepper-errors' +import { useQuasar } from 'quasar' import { useValidation } from 'src/store/validation' export default defineComponent({ @@ -63,13 +64,21 @@ export default defineComponent({ const { reset: resetCffData } = useCff() const { reset: resetStepperErrorState } = useStepperErrors() const { errors } = useValidation() + const q = useQuasar() return { isValidCFF: computed(() => errors.value.length === 0), - createAnother: async () => { - resetCffData() - resetStepperErrorState() - setShowAdvanced(false) - await setStepName('start') + confirmAndReset: async () => { + q.dialog({ + title: 'Confirm', + message: 'Would you like to reset the form? All changes will be lost.', + cancel: true, + persistent: true + }).onOk(async () => { + resetCffData() + resetStepperErrorState() + setShowAdvanced(false) + await setStepName('start') + }) } } } From 66312e9838b7ba8d4a1da2ef75a9286f5cb8ff54 Mon Sep 17 00:00:00 2001 From: Faruk D Date: Mon, 29 Aug 2022 15:52:59 +0200 Subject: [PATCH 041/132] make linter happier --- src/components/ScreenFinishAdvanced.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ScreenFinishAdvanced.vue b/src/components/ScreenFinishAdvanced.vue index 1320ae8b..3f5a737e 100644 --- a/src/components/ScreenFinishAdvanced.vue +++ b/src/components/ScreenFinishAdvanced.vue @@ -50,8 +50,8 @@ import { computed, defineComponent } from 'vue' import DownloadButton from 'components/DownloadButton.vue' import { useApp } from 'src/store/app' import { useCff } from 'src/store/cff' -import { useStepperErrors } from 'src/store/stepper-errors' import { useQuasar } from 'quasar' +import { useStepperErrors } from 'src/store/stepper-errors' import { useValidation } from 'src/store/validation' export default defineComponent({ @@ -67,7 +67,7 @@ export default defineComponent({ const q = useQuasar() return { isValidCFF: computed(() => errors.value.length === 0), - confirmAndReset: async () => { + confirmAndReset: () => { q.dialog({ title: 'Confirm', message: 'Would you like to reset the form? All changes will be lost.', From 6947dec1fcde81cd8d99eee042c6a69098775dfd Mon Sep 17 00:00:00 2001 From: Reggie Cushing Date: Fri, 26 Aug 2022 14:25:44 +0200 Subject: [PATCH 042/132] change $q to q to remove vue warning --- src/components/DownloadButton.vue | 6 +++--- src/components/ScreenFinishMinimum.vue | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/DownloadButton.vue b/src/components/DownloadButton.vue index aa6e0db8..2976a2aa 100644 --- a/src/components/DownloadButton.vue +++ b/src/components/DownloadButton.vue @@ -9,7 +9,7 @@ type="a" download="CITATION.cff" v-bind:href="downloadUrl" - v-bind:class="$q.platform.is.mobile ? 'full-width' : ''" + v-bind:class="q.platform.is.mobile ? 'full-width' : ''" /> @@ -26,9 +26,9 @@ export default defineComponent({ name: 'DownloadButton', setup () { const { cffstr } = useCffstr() - const $q = useQuasar() + const q = useQuasar() return { - $q, + q, downloadUrl: computed(() => toDownloadUrl(cffstr.value)) } } diff --git a/src/components/ScreenFinishMinimum.vue b/src/components/ScreenFinishMinimum.vue index 24d2283e..afa6dd8a 100644 --- a/src/components/ScreenFinishMinimum.vue +++ b/src/components/ScreenFinishMinimum.vue @@ -33,7 +33,7 @@ size="xl" to="/identifiers" v-on:click="showAdvanced" - v-bind:class="$q.platform.is.mobile ? 'full-width' : ''" + v-bind:class="q.platform.is.mobile ? 'full-width' : ''" />
@@ -60,9 +60,9 @@ export default defineComponent({ setup () { const { setShowAdvanced, setStepName } = useApp() const { errors } = useValidation() - const $q = useQuasar() + const q = useQuasar() return { - $q, + q, isValidCFF: computed(() => errors.value.length === 0), showAdvanced: async () => { setShowAdvanced(true) From 5aee6bf8323fd05927a8c7b1b358730c8832fb00 Mon Sep 17 00:00:00 2001 From: Faruk D Date: Mon, 29 Aug 2022 16:30:45 +0200 Subject: [PATCH 043/132] fix extra margin --- src/components/InfoDialog.vue | 114 ++++++++++++++++------------------ 1 file changed, 55 insertions(+), 59 deletions(-) diff --git a/src/components/InfoDialog.vue b/src/components/InfoDialog.vue index 01110fb1..bf74688d 100644 --- a/src/components/InfoDialog.vue +++ b/src/components/InfoDialog.vue @@ -1,69 +1,65 @@ - - diff --git a/src/components/Stepper.vue b/src/components/Stepper.vue index 3322adcf..f3506057 100644 --- a/src/components/Stepper.vue +++ b/src/components/Stepper.vue @@ -32,23 +32,13 @@ v-on:click="setStepName('authors')" /> - - @@ -59,7 +49,7 @@ title="Related resources" v-bind:active-icon="errorStateScreenRelatedResources ? 'warning' : 'edit'" v-bind:error="errorStateScreenRelatedResources" - v-bind:order="4" + v-bind:order="3" v-if="showAdvanced" v-on:click="setStepName('related-resources')" /> @@ -68,7 +58,7 @@ data-cy="step-abstract" name="abstract" title="Abstract" - v-bind:order="5" + v-bind:order="4" v-if="showAdvanced" v-on:click="setStepName('abstract')" /> @@ -79,7 +69,7 @@ title="Keywords" v-bind:active-icon="errorStateScreenKeywords ? 'warning' : 'edit'" v-bind:error="errorStateScreenKeywords" - v-bind:order="6" + v-bind:order="5" v-if="showAdvanced" v-on:click="setStepName('keywords')" /> @@ -88,7 +78,7 @@ data-cy="step-license" name="license" title="License" - v-bind:order="7" + v-bind:order="6" v-if="showAdvanced" v-on:click="setStepName('license')" /> @@ -99,19 +89,18 @@ title="Version specific" v-bind:active-icon="errorStateScreenVersionSpecific ? 'warning' : 'edit'" v-bind:error="errorStateScreenVersionSpecific" - v-bind:order="8" + v-bind:order="7" v-if="showAdvanced" v-on:click="setStepName('version-specific')" /> diff --git a/src/components/StepperActions.vue b/src/components/StepperActions.vue index aaa15aad..35b27475 100644 --- a/src/components/StepperActions.vue +++ b/src/components/StepperActions.vue @@ -22,7 +22,7 @@ label="Finish" no-caps v-bind:class="!showAdvanced ? 'hidden' : ''" - v-bind:to="showAdvanced === true ? '/finish-advanced' : '/finish-minimum'" + to="/finish" /> import('src/components/LayoutStepper.vue'), children: [{ path: '', component: () => import('src/components/ScreenAuthors.vue') }] }, - { - path: '/finish-minimum', - component: () => import('src/components/LayoutStepper.vue'), - children: [{ path: '', component: () => import('src/components/ScreenFinishMinimum.vue') }] - }, { path: '/identifiers', component: () => import('src/components/LayoutStepper.vue'), @@ -55,9 +50,9 @@ const routes: RouteRecordRaw[] = [ children: [{ path: '', component: () => import('src/components/ScreenVersionSpecific.vue') }] }, { - path: '/finish-advanced', + path: '/finish', component: () => import('src/components/LayoutStepper.vue'), - children: [{ path: '', component: () => import('src/components/ScreenFinishAdvanced.vue') }] + children: [{ path: '', component: () => import('src/components/ScreenFinish.vue') }] }, { path: '/404', diff --git a/src/store/app.ts b/src/store/app.ts index 827aa26a..1fff9c70 100644 --- a/src/store/app.ts +++ b/src/store/app.ts @@ -1,40 +1,40 @@ import { computed, ref } from 'vue' import { useRouter } from 'vue-router' -export type StepNameType = 'start' | 'authors' | 'finish-minimum' | 'identifiers' | 'related-resources' | - 'abstract' | 'keywords' | 'license' | 'version-specific' | 'finish-advanced' +export type StepNameType = 'start' | 'authors' | 'identifiers' | 'related-resources' | + 'abstract' | 'keywords' | 'license' | 'version-specific' | 'finish' const state = ref({ showAdvanced: false, stepIndex: 0 }) -const stepNames = [ +const basicStepNames = [ 'start', - 'authors', - 'finish-minimum', - 'identifiers', - 'related-resources', - 'abstract', - 'keywords', - 'license', - 'version-specific', - 'finish-advanced' + 'authors' ] as Array -const advancedStepNames = new Set([ +const advancedStepNames = [ 'identifiers', 'related-resources', 'abstract', 'keywords', 'license', 'version-specific' -]) +] as Array + +const stepNames = computed(() => { + if (state.value.showAdvanced) { + return basicStepNames.concat(advancedStepNames).concat(['finish']) + } else { + return basicStepNames.concat(['finish']) + } +}) const firstStepIndex = 0 -const lastStepIndex = computed(() => state.value.showAdvanced ? stepNames.indexOf('finish-advanced') : stepNames.indexOf('finish-minimum')) -const stepName = computed(() => stepNames[state.value.stepIndex]) +const lastStepIndex = computed(() => stepNames.value.length - 1) +const stepName = computed(() => stepNames.value[state.value.stepIndex]) export const useApp = () => { const router = useRouter() @@ -45,33 +45,25 @@ export const useApp = () => { showAdvanced: computed(() => state.value.showAdvanced), stepName, navigateDirect: (newStepName: StepNameType) => { - if (!stepNames.includes(newStepName)) { + if (![...basicStepNames, ...advancedStepNames, 'finish'].includes(newStepName)) { return } - if (advancedStepNames.has(newStepName) || newStepName === 'finish-advanced') { + if (advancedStepNames.includes(newStepName)) { state.value.showAdvanced = true } - state.value.stepIndex = stepNames.indexOf(newStepName) + state.value.stepIndex = stepNames.value.indexOf(newStepName) }, setStepName: async (newStepName: StepNameType) => { - state.value.stepIndex = stepNames.indexOf(newStepName) + state.value.stepIndex = stepNames.value.indexOf(newStepName) await router.push({ path: `/${stepName.value}` }) }, navigateNext: async () => { - if (state.value.showAdvanced === true && stepName.value === 'authors') { - // extra increment to step past finish-minimum - state.value.stepIndex++ - } if (state.value.stepIndex < lastStepIndex.value) { state.value.stepIndex++ await router.push({ path: `/${stepName.value}` }) } }, navigatePrevious: async () => { - if (state.value.showAdvanced === true && stepName.value === 'identifiers') { - // extra decrement to step past finish-minimum - state.value.stepIndex-- - } if (state.value.stepIndex > firstStepIndex) { state.value.stepIndex-- await router.push({ path: `/${stepName.value}` }) From aadbcb14c8d3d158db1f3ac9219072a190829b84 Mon Sep 17 00:00:00 2001 From: Abel Soares Siqueira Date: Tue, 18 Oct 2022 16:52:48 +0200 Subject: [PATCH 074/132] Change screen level validation to use the error filtering system --- src/components/AuthorCardEditing.vue | 7 +- src/components/AuthorCardViewing.vue | 7 +- src/components/ScreenAuthors.vue | 7 +- src/components/ScreenFinish.vue | 3 - src/components/ScreenIdentifiers.vue | 7 +- src/components/ScreenKeywords.vue | 7 +- src/components/ScreenRelatedResources.vue | 7 +- src/components/ScreenStart.vue | 7 +- src/components/ScreenVersionSpecific.vue | 7 +- src/components/Stepper.vue | 58 ++++++++++++---- src/error-filtering.ts | 79 ++++++++++++++++++++++ src/store/stepper-errors.ts | 32 --------- test/jest/__tests__/store/app.jest.spec.ts | 3 - 13 files changed, 130 insertions(+), 101 deletions(-) delete mode 100644 src/store/stepper-errors.ts diff --git a/src/components/AuthorCardEditing.vue b/src/components/AuthorCardEditing.vue index fd7544f6..e5587b8a 100644 --- a/src/components/AuthorCardEditing.vue +++ b/src/components/AuthorCardEditing.vue @@ -159,9 +159,8 @@ - diff --git a/src/components/IdentifierCardViewing.vue b/src/components/IdentifierCardViewing.vue index 6838fb02..9a2d1e53 100644 --- a/src/components/IdentifierCardViewing.vue +++ b/src/components/IdentifierCardViewing.vue @@ -15,19 +15,21 @@ diff --git a/src/components/Preview.vue b/src/components/Preview.vue index 7a48f403..38369a99 100644 --- a/src/components/Preview.vue +++ b/src/components/Preview.vue @@ -29,12 +29,18 @@ +