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

Files & Pages field: singular empty text when multiple: false #6565

Closed
mrflix opened this issue Jul 23, 2024 · 2 comments · Fixed by #6571
Closed

Files & Pages field: singular empty text when multiple: false #6565

mrflix opened this issue Jul 23, 2024 · 2 comments · Fixed by #6571
Assignees
Labels
type: enhancement ✨ Suggests an enhancement; improves Kirby
Milestone

Comments

@mrflix
Copy link
Contributor

mrflix commented Jul 23, 2024

I'm a big fan of being able to change the empty text of file and page fields and sections.

I just stumbled upon that the files & pages field always uses a plural empty text:

"No pages selected yet"
"No files selected yet"

Even when multiple: false is set to restrict the field to only select one file/page.
In that case it should say:

"No page selected yet"
"No file selected yet"

@gbdesign2023
Copy link

@mrflix I would not describe this as an error, as there is an option to specify the text yourself if no page or file has been selected yet:

fields:
  related:
    label: Related Pages
    type: pages
    multiple: false
    empty: "No page selected yet"

https://getkirby.com/docs/reference/panel/fields/files#field-properties
https://getkirby.com/docs/reference/panel/fields/pages#field-properties

There are certainly also special scenarios where a distinction between singular and plural integrated into the core system is undesirable.

@mrflix
Copy link
Contributor Author

mrflix commented Jul 25, 2024

@gbdesign2023 as I wrote: I know and love the empty property. And I wouldn't call it an error either – just an UX enhancement.

@distantnative distantnative added the type: enhancement ✨ Suggests an enhancement; improves Kirby label Jul 25, 2024
@distantnative distantnative self-assigned this Jul 25, 2024
@distantnative distantnative linked a pull request Jul 25, 2024 that will close this issue
5 tasks
@bastianallgeier bastianallgeier added this to the 4.4.0 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement ✨ Suggests an enhancement; improves Kirby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants