sodal-project / cartographer

Cartographer version 1 is a complete rewrite adding the concept of modules.
1 stars 0 forks source link

EDIT: module names to use camelCase #113

Open tbenbow opened 5 days ago

tbenbow commented 5 days ago

The folders inside the modules folder must be named using kabob-case. This is because these names are used in urls which should be lowercase.

This has the unfortunate side-effect of requiring us to call the function names using bracket notation instead of dot notation.

This will not work...

core.mod.module-name.function

Instead we need to use...

core.mod["module-name"].function

This would also be an issue for function names in the modules though so far we only call index functions from the url.

tbenbow commented 5 days ago

@andyschwab - I think we will have another kabob-case/camelCase naming issue if we use the function name "mainPane". Maybe just "main"?

andyschwab commented 5 days ago

I did some experimentation, and I'd like to solve this from the other direction and maintain camelcase as the default across the board. Because of how Cartographer will be deployed for the foreseeable future, this shouldn't be an issue.

In future, we can support case-agnostic client calls that alias to backend function calls.

tbenbow commented 4 days ago

@andyschwab Got it - just to confirm this means we have urls like this...

Screenshot 2024-11-13 at 4 34 35 PM

and folder names like this...

Screenshot 2024-11-13 at 4 35 34 PM

Look good?