Some of the constants defined in D9274 are going to be used across different files. To ensure that this code is future proof and less "brittle" I created this constants file as a single source of truth where we define and export the relevant constants
Details
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Don't love the indirection, but seems like a reasonable approach
Wdym by indirection here? Happy to make any updates to make it less indirect
cc @atul
Just that the constants are in a separate file creates "distance" from where the values are defined and where they're used. But given you need to use them in multiple places this seems like a good bet.
IDE will "show" value of eg userProfileActionButtonHeight on hover anyways
Ah gotcha, thanks for clarifying. I know we also do this with chat constants too. My main concern is that if we use these values in different files, I am concerned that a future dev might edit a value in one place, but forget to/is not aware they need to update another place too.
Given both of these reasons, I will just keep this approach
Keeping constants that are imported from lots of different places in separate files also helps to avoid import cycles