Replace usages of camp.name to camp.shortname
- Switch title and shortname content in DB if shortname length is longer than 16 chars and title length is shorter or equal to 16 characters.
- Title should be shown instead of shortname if the space allows for it. In URLs and filenames the shortname is used.
- Title is now nullable and not required.
- Optimize mobile bottom bar shortname display to account for 16 characters. Limit shortname to 16 characters in frontend, but do not limit it yet in the api.
- Adjust print cover to reflect the changes as well
Opted for 16 characters as it is the sweet spot for existing data vs. space in the mobile view.
Fixes #2992
Feature branch deployment currently inactive.
If the PR is still open, you can add the deploy! label to this PR to trigger a feature branch deployment.
looks good to me, thank you. i think we need to really show the shortname always
I worked on this quite a while and come to the conclusion that we should treat the title just as the long form of the shortname. As the content is the same or should rather be put into the motto or organization.
For this reason I made the title nullable and not required, as it is not necessary anymore and is just displayed when we have enough space. I also didn't change the length to 64 characters, as I can't imagine a title be necessarily be longer than 32 characters. With 64 characters it is also only really possible to be displayed on the cover page of the pdf, so that would not make sense.
Core Meeting Discussion
Our current implementation is not what we want. Following our discussion protocol. We didn't decide anything as the conversion was too long.
Goals
- We want a way to identify the camp fully.
- We want to identify the camp as good as possible when space is sparse.
- We want a model that is widely understood.
- (J+S) A motto (Lagereinkleidung) should be included on the picasso
- We don't need a common short text identifier that is used in URL (we have unique ids)
Examples
SoLa
- What is the full identifier of a camp? Lagerart: Sommerlager Jahr: 2023 Organisator: Wolfstufe Dracheburg
- We want to identify the camp as good as possible when space is sparse. SoLa 23 Wolfstufe
Klassenlager
- What is the full identifier of a camp? Lagerart: Klassenlager Jahr: 2023 Klassenzug: 5. Klasse Organisator: Schule Moritzberg Ort: Scuol
- We want to identify the camp as good as possible when space is sparse. KlaLa 23 Scuol
PBS Kurs
- What is the full identifier of a camp? Lagerart: Basiskurs Jahr: 2023 Organisator: Pfadi Kanton Bern Kursnummer: BE111-12
- We want to identify the camp as good as possible when space is sparse. Basis BE111-12
Implementation
Version 1
- Name: rename to shortname, mandatory, max. 16 characters, will always be displayed
- Title: non-mandatory, max. 32, will be additionally displayed where we have sufficient space
- Motto: -- > translation "Motto / Thema"
- Organizer
Version 2 (this PR)
- Name: rename to shortname, mandatory, max. 16 characters, will always be displayed
- Title: non-mandatory, max. 32, will be displayed instead of shortname where we have sufficient space
- Motto: -- > translation "Motto / Thema"
- Organizer
Version 3 (GUI idea)
- Title: create, max:32
- Name: create, max:16, (substring(16) of title automatically)
- Description: create, nullable, max:64/128
- Organizer: create
Core Meeting Decision
- Short title is used only: mobile bottomnav, desktop topnav, url
- camp create shorttitle is not shown, organization is shown
Migration:
- if shortname == title then delete shortname
- if shortname.length <= 16 do nothing
- if shortname.length > 16 and title.length < shortname.length then switch
- lastly crop shortname to length of 16
Test this on a prod dump and look at the results
@ecamp/core please look at this again. I've now implemented as discussed.