exercism / wip

Please use https://github.com/exercism/exercism for bugs or improvements.
1 stars 2 forks source link

changelog_entry_action view model #46

Closed iHiD closed 4 years ago

iHiD commented 4 years ago

@kntsoriano I found the naming of https://github.com/exercism/website/blob/8bb3c1013e60a497180ae2a4c53899bcf1462b95/app/view_models/changelog_admin/changelog_entry_action.rb#L2 to be confusing. I think it should be a plural (Actions) and I'd sort of like a ViewModel name/context in there to make it clear what/where it is? How could we refactor/rename this to make it clearer?

I wondered about using a Presenter rather than a ViewModel. I'm not sure though. Interested in your thoughts.

kntsoriano commented 4 years ago

@iHiD I agree with a namespace to make it clearer. So the way I think about this is that the button should render itself, and not one big class rendering several buttons (view model vs presenter).

Instead of view model, I've thought about naming it as component, but it might be ambiguous. Would view component be better? Or widget (since we have this in our code already)?

iHiD commented 4 years ago

Yeah, I like widget. ChangelogActionButtonsWidget or something?

kntsoriano commented 4 years ago

So to reiterate, it won't be plural because the button will render itself.