webviz-subsurface-components icon indicating copy to clipboard operation
webviz-subsurface-components copied to clipboard

Naming consistency: colorMap vs. colormap

Open w1nklr opened this issue 6 months ago • 0 comments

Currently, a mix of colormap and colorMap naming schemes is used.

Some stats about occurrence:

colormap colorMap
Published Code (a) 225 results in 25 files 517 results in 41 files
Full Code (b) 278 results in 35 files 735 results in 62 files
Overall (c) 294 results in 41 files 761 results in 71 files

Despite the fact that colorMap usage is twice the one of colormap, it makes sense to move to colormap, since it represents more than a map of colors.

Replacing colorMap by colormap can be done in 3 steps:

  • [x] renaming of local variables, functions, interfaces, types, classes... This should not be risky, as they are not exposed to client code
  • [x] renaming exported types Keeping a deprecated type using the old name ensures backward compatibility
  • [ ] renaming component properties A transition would be to support both old and new names, deprecating the old version for backward compatibility.

Notes:

  • a): Published code, where tests and stories are excluded
  • b): Full code including tests and stories
  • c): Overall files, including markdown and json files.

w1nklr avatar Jun 16 '25 14:06 w1nklr