bridge-cli icon indicating copy to clipboard operation
bridge-cli copied to clipboard

Move all actions to `CB::Action` module.

Open abrightwell opened this issue 3 years ago • 1 comments

This is not a functional change. Here we're only seeking to organize the code a little bit further now that the action list has grown quite extensively.

The impetus for this was originally stated as a comment in #45 about how we had a name conflict between Token and TokenAction and wanting to maybe clean that up a little.

Candidly, I'm not sure how I feel about this one overall. I do think that giving actions their own module is a good thing, however, I'm less confident in how I've accomplished that here. More specifically, I toyed with the idea of CB::Action vs Action... and I tried both. I ultimately landed on CB::Action as it just felt a little better to me. However, I have no strong opinion here.

The other thing I did was I went through and move all the of the CB::Action::<name> declarations under a module CB::Action block. That resulted in a lot of 'files' appearing as changed given that it formatted them differently. However, the above is the only real change to these files.

I also opted to move the actions to their own directory. I don't think this is the final form as I wasn't certain what to do with the scope_checks directory. Seems like it might be appropriate to move it along with the scope.cr file. Also, dirs.cr I was a little on the fence about, but felt it was best left where it was for now.

At any rate, this is just an initial swing at this but accepted that it could potentially use some polish and it might not be the only swing at it.

abrightwell avatar Jun 14 '22 15:06 abrightwell

I like grouping them in the directory for sure

will avatar Jun 15 '22 00:06 will