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

[BETA FEEDBACK] Pascal case names for DataTypes #596

Closed
JoseMarcenaro opened this issue Mar 8, 2024 · 6 comments
Closed

[BETA FEEDBACK] Pascal case names for DataTypes #596

JoseMarcenaro opened this issue Mar 8, 2024 · 6 comments
Labels
beta-feedback Feedback on some beta release

Comments

@JoseMarcenaro
Copy link
Contributor

Nightly build 14.0.0-build.20240307.8

Hi Kevin, I noticed the file naming convention for DataTypes changed from lowercase-with-hyphens to PascalCase. Is this by design, or we should expect it to revert to the previous versions convention?

Thanks a lot! It's amazing to have it working already.

@JoseMarcenaro JoseMarcenaro added the beta-feedback Feedback on some beta release label Mar 8, 2024
@JoseMarcenaro
Copy link
Contributor Author

Aditional info

  • I started from scratch (new database, no uSync)
  • this time I installed 14.0.0-beta001 instead of the latest nightly build
  • After building and launching Umbraco (before using the uSync dashboard) I got all the DataTypes files generated with lowercase-with-hyphens (as in previous versions)
  • Saving an existing data type kept the lowercase file naming
  • But using the Export button generated duplicate files for all data types, with the PascalCase naming convention.

Thanks in advance.

@KevinJump
Copy link
Owner

Hi,

Did you have any previous files in the install?

my files are generated pascal, from a clean install, but that is actually how they are generated on previous versions (e.g. a v9 folder has ApprovedColour.config

there is a camel / pascal naming thing for the properties inside a doctype, but we do convert that on import, so from old it will in theory work (but we don't support dropping a v9 folder into the beta yet.

@JoseMarcenaro
Copy link
Contributor Author

JoseMarcenaro commented Mar 9, 2024

Hi,
I did not have any previous files in the install, no uSync folder was present.
With uSync 14.0.0-beta001, just installing the package and running Umbrago generated the lowercase FileTypes files.
And then pressing the Export button generated duplicated files in PascalCase (whenever the name is not the same because of the hyphens)

I can follow up in the code and try to find/fix the issue - if it is appropriate at this early stage. Please let me know. Thanks.

@KevinJump
Copy link
Owner

Hi, If you think you can find the issue in the code that would help lots.

@JoseMarcenaro
Copy link
Contributor Author

Hi @KevinJump - I can no longer reproduce the issue.

  • I built a site from scratch, then run it with a reference to your source code in v14/dev (fork), and the DataTypes files where generated correctly (PascalCase)
  • Did the same (on a new site) using the v14.0.0-beta001 nuget package, with the same results.

So something must have gone wrong in my previous attempts. Closing the issue.

@JoseMarcenaro
Copy link
Contributor Author

@KevinJump I found out when this inconsistent behavior happens:

When UseFlatStructure = false

  • The initial files generation (when installing uSync and running Umbraco) uses lowercase-with-hyphens. And folders are honored. This is consistent with what v9 does (when UseFlatStructure = false).
  • Saving an existing data type behaves the same way.
  • But the Export button ignores the UseFlatStructure flag: names are PascalCase, folders are not honored, duplicated files appear all over the place.

I'm opening a separate ticket for this: #599

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-feedback Feedback on some beta release
Projects
None yet
Development

No branches or pull requests

2 participants