RFC: New directory structure for src/features/
#1816
Replies: 4 comments 10 replies
-
To be honest, I'm also not sure about I feel like having both
|
Beta Was this translation helpful? Give feedback.
-
My immediate thought is that one drawback of doing exactly what's stated in the issue is that tabs in an IDE often only show the file name, so I would give some thought to changing the directory structure but keeping the js/json file names. This is, though, a) kind of odd, and b) wouldn't be consistent for options files unless also making them e.g.
As long as git treats them as file renames and updated imports, I wouldn't worry too much about it. My guess is that would happen even if we squash merged a PR that did this. If necessary we could squash the PR down to "rename files commit; update imports commit" and then merge commit that, if we were careful. (I do this on my other project when I convert js files to ts, as I believe the diff can be big enough to confuse git in that case.) |
Beta Was this translation helpful? Give feedback.
-
Semi-relevant: a while ago I thought about how we could reduce the number of json files, but I don't remember the details. iirc inlining them into feature js ( |
Beta Was this translation helpful? Give feedback.
-
Eh, only took like an hour and a half of mostly hitting the same shortcut keys repeatedly. I only needed to do a force push to a stacked-pr branch on a different repository, checked out the wrong repository, checked out the wrong branch on the right repository, force pushed to an entirely unrelated PR branch, and had to recover the correct commit using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now, the structure for the
features
directory is:Two things bother me about this.
timeformat
's files, I can end up missing thattimestamps
is even there, because they're similar-looking strings when not paying full attention.Thus, I would like to propose an overhaul of these files to fit a new, non-repetitive structure:
The main drawback of implementing this would, of course, be that all currently-open pull requests making feature modifications would become conflicting and need rebasing. This would create a significant volume of work for @marcustyphoon, so I will consider their buy-in a requirement for doing this.
I'm also not 100% certain if flattening the
options.*
files into the feature directory proper is the right move. We don't currently have any features that utilise both custom preferences and child scripts, so there wouldn't be any mixing of those done in this move, but it would open the possibility of putting them flat in the same directory in the future. One could also argue that if we're grouping feature runtime files into subdirectories, we should keep the same treatment for feature preference interfaces as well? I could be persuaded in either direction.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions