decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.66k stars 3.02k forks source link

Add <span> tag to (optional) suffix for customization #7103

Closed leomp12 closed 3 months ago

leomp12 commented 4 months ago

With the (or any) tag we can add CSS like:

body {
  [class*=FieldLabel-fieldLabel] span {
    display: none;
  }
}

to hide or customize the (optional) suffix.

It'll specially useful when majority of the fields are optional, we can also use CSS :has to select required fields and add a * for example.

Summary

Test plan

Checklist

Please add a x inside each checkbox:

A picture of a cute animal (not mandatory but encouraged)

leomp12 commented 4 months ago

hey @martinjagodic , I don't know why the linter is failing tbh :neutral_face: JSX seems to be valid and there's no useful output on execution here https://github.com/decaporg/decap-cms/actions/runs/8160169924/job/22306202350?pr=7103

demshy commented 3 months ago

Hi @leomp12 lint checker is blaming the packages/decap-cms-core/src/components/Editor/EditorControlPane/EditorControl.js file can you please run npm run format and see what changes it does?

leomp12 commented 3 months ago

done @demshy 👍🏾

demshy commented 3 months ago

@leomp12 to find the cause for the test fail easier you can run cypress in dev mode locally with npm run test:e2e:dev and run only the test in question (I think markdown_widget_code_block_spec.js) until it passes