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

v3 - singular form of company location id #582

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

mathiazom
Copy link
Contributor

@mathiazom mathiazom commented Sep 4, 2024

The id used for the company location document was in plural. This is confusing as there is also a field accepting multiple locations using the plural form. The location name of the location document has been given a separate id.

Checklist

Please ensure that you’ve completed the following checkpoints before submitting your pull request:

  • Documentation: Relevant documentation has been added or updated (if applicable).
  • Testing: Have you tested your changes thoroughly?

Copy link

vercel bot commented Sep 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
variant-no ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 6:20am
variant-se-2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 5, 2024 6:20am

@mathiazom mathiazom force-pushed the refactor/v3-plural-compay-location-confusion branch from 4cbc2b6 to 8cfc7b8 Compare September 5, 2024 06:18
Copy link
Contributor

@christinaroise christinaroise left a comment

Choose a reason for hiding this comment

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

the document companyLocations is a list of companyLocations.. hence plural.

@mathiazom
Copy link
Contributor Author

the document companyLocations is a list of companyLocations.. hence plural.

No, the document itself only represents a single location. However, multiple company locations can be defined via Studio because of documentTypeList(companyLocationID). This is the same as legal documents and dynamic pages. The field locations in studio/schemas/objects/locations.ts can be plural because that is a field for an array of multiple locations.

@christinaroise
Copy link
Contributor

No, the document itself only represents a single location. However, multiple company locations can be defined via Studio because of documentTypeList(companyLocationID). This is the same as legal documents and dynamic pages. The field locations in studio/schemas/objects/locations.ts can be plural because that is a field for an array of multiple locations.

Good point. Perhaps we should add some cleanup in this pr

@christinaroise
Copy link
Contributor

...or in a separate PR. I think that when we notice smaller cleanups like this, we should adjust for the entire repo so to keep the consistency

@mathiazom mathiazom merged commit d323317 into v3 Sep 5, 2024
6 checks passed
@mathiazom mathiazom deleted the refactor/v3-plural-compay-location-confusion branch September 5, 2024 07: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.

3 participants