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

Editor: No attachement upload to draft only #1052

Merged
merged 9 commits into from
Dec 12, 2024

Conversation

Angi-Kinas
Copy link
Collaborator

Description

This PR introduces the ability to detect if a record is draft only (never has been published) and disabling the input fields for uploading attachments (since this is only possible for published records). Additionally it indicates visually with a banner how to change the disabled state of the fields.

These changes were applied to the following editor fields:

  • the overview component
  • the online resource component
  • the online link resource component

Screenshots

image
image
image

Quality Assurance Checklist

  • Commit history is devoid of any merge commits and readable to facilitate reviews
  • If new logic ⚙️ is introduced: unit tests were added
  • If new user stories 🤏 are introduced: E2E tests were added
  • If new UI components 🕹️ are introduced: corresponding stories in Storybook were created
  • If breaking changes 🪚 are introduced: add the breaking change label
  • If bugs 🐞 are fixed: add the backport <release branch> label
  • The documentation website 📚 has received the love it deserves

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Affected libs: feature-editor, ui-inputs, feature-dataviz, feature-record, feature-router, feature-search, feature-map, ui-elements, feature-notifications, feature-catalog, ui-catalog, ui-search, ui-layout,
Affected apps: metadata-editor, datafeeder, demo, metadata-converter, datahub, webcomponents, map-viewer, search,

  • 🚀 Build and deploy storybook and demo on GitHub Pages
  • 📦 Build and push affected docker images

Copy link
Contributor

github-actions bot commented Dec 3, 2024

📷 Screenshots are here!

Copy link
Contributor

github-actions bot commented Dec 3, 2024

📷 Screenshots are here!

@coveralls
Copy link

coveralls commented Dec 3, 2024

Coverage Status

coverage: 81.783% (-1.6%) from 83.419%
when pulling 8827faa on ME-no-attachement-upload-to-draft-only
into a731fc6 on main.

@CLAassistant
Copy link

CLAassistant commented Dec 8, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@tkohr tkohr left a comment

Choose a reason for hiding this comment

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

Thanks for the warnings and disablings @Angi-Kinas! This will result in a much better user experience.

Don't forget to add a French translation before merging.

I noticed that the "distribution" toggle does not display a cursor-not-allowed on hover when disabled, but this is just a detail and not blocking IMO.

@@ -216,6 +215,7 @@
"editor.record.form.field.constraintsShortcuts": "",
"editor.record.form.field.contacts.noContact": "Please provide at least one point of contact.",
"editor.record.form.field.contactsForResource.noContact": "Please provide at least one point of contact responsible for the data.",
"editor.record.form.field.draft.only.disabled": "This field will be enabled once published",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe same wording as German translation ?

Suggested change
"editor.record.form.field.draft.only.disabled": "This field will be enabled once published",
"editor.record.form.field.draft.only.disabled": "This field will be enabled once the data has been published",

@@ -216,6 +215,7 @@
"editor.record.form.field.constraintsShortcuts": "",
"editor.record.form.field.contacts.noContact": "Veuillez renseigner au moins un point de contact.",
"editor.record.form.field.contactsForResource.noContact": "Veuillez renseigner au moins un point de contact responsable de la donnée.",
"editor.record.form.field.draft.only.disabled": "",
Copy link
Collaborator

Choose a reason for hiding this comment

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

French translation is missing. Google and I propose:

Suggested change
"editor.record.form.field.draft.only.disabled": "",
"editor.record.form.field.draft.only.disabled": "Ce champ sera activé une fois les données publiées",

@Angi-Kinas Angi-Kinas merged commit decc890 into main Dec 12, 2024
14 checks passed
@Angi-Kinas Angi-Kinas deleted the ME-no-attachement-upload-to-draft-only branch December 12, 2024 12:07
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.

4 participants