apostrophecms / docs

ApostropheCMS documentation.
MIT License
4 stars 14 forks source link

Pro 3527 when empty #295

Closed haroun closed 1 year ago

haroun commented 1 year ago

Summary

Add whemEmpty options to inline array

What are the specific steps to test this change?

For example:

  1. Run the website and log in as an admin
  2. Open a piece manager modal and select several pieces
  3. Click the "Archive" button on the top left of the manager and confirm that it should proceed
  4. Check that all pieces have been archived properly

What kind of change does this PR introduce?

(Check at least one)

Make sure the PR fulfills these requirements:

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

linear[bot] commented 1 year ago
PRO-3527 As an admin I can easily understand what is needed when the user or group permission list is empty

[image.png](https://uploads.linear.app/4e73c947-c168-4b4a-9281-01a7243d77be/54021080-8be0-4ab1-a779-2003044a9182/47400662-32b5-4cf6-a57d-1a37ef436f57) **\[Visual reference: see the area marked "No additional user permissions"\]** The visualization of the initially empty selections (see first image above) will be handled by introducing a new feature of inline `array` fields, activated by a new `whenEmpty` option. `whenEmpty` can have `label` and `icon` subproperties. When this option is configured for an inline array field and the array is currently empty, the configured icon and label are displayed per the design above. Icons themselves should be added to the system the same way widget icons already are (see the documentation and the source code for examples). **Acceptance criteria** * When an inline array is empty, a hint appears as described above. * When an inline array is no longer empty, the hint disappears. * Configure these per the design for the user and group permissions fields.