feat(#2849): replace hardcoded view strings with constants#10615
feat(#2849): replace hardcoded view strings with constants#10615
Conversation
561391f to
ca39be0
Compare
|
@jkuester this is ready for review. Mostly the changes are just find and replace the view paths with constants, mostly VIEWS.VIEW_NAME, which has the ddocs and view name combine e.g In some cases design ddocs are referred to by name; these are still replaced with constants e.g. DDOC_IDS.MEDIC_CLIENT; I have left these even though to actually change these references it would not be enough to just change the constant values, you would need to figure out what the relevant code is actually doing and replace it with its new equivalent. Most of these are in tests where it is checking the ddoc that should be replicated to offline clients. although the diff is very large, the only files which changed beyond find/replace are:
|
|
FYI, unfortunately I could not get to this PR this week. But, it is still on my TODO list, and I will review it next week! 👍 |
jkuester
left a comment
There was a problem hiding this comment.
Excellent uplift @witash! I particularly appreciate your care for keeping the diff clean and only containing the necessary changes!
I have gone through everything line by line and have just a few suggestions/questions. Otherwise, LGTM!
| 'medic-user': { | ||
| 'medic-user': [ | ||
| 'read', | ||
| ], | ||
| }, |
There was a problem hiding this comment.
Is this supposed to be here? I am not seeing the existing ddoc that this maps to... 🤔
subset of #2849
Replace hardcoded view strings wtih constants to allow changing which views are in which ddocs more easily in future.