Skip to content

Decouple presentation of note_awards_list

What does this MR do?

Refactors note_awards_list component by pulling out the presentational part into a vue_shared/components/awards_list.vue.

Why?

The Snippets Vue app needs a similar award component. By decoupling the presentation from the Vuex binding and note-specific behavior, we can now reuse awards_list.vue

Follow ups

We still need the ability to always show 👍 or 👎. For now, this MR focuses on just a pure refactor. We'll handle this enhancement in a follow up.

Screenshots

Still works 👍

20200416_emojis_still_work

Pinning test

To run the pinning tests locally, checkout this MR's branch and first revert the commit which removes the pinning test:

git revert --no-commit $(git log -1 --grep="Remove note_awards_list pinning test" --pretty=format:"%H")

Then run the test

yarn run jest spec/frontend/notes/components/note_awards_list_pin_spec.js

Ready to merge?

Feel free to remove the WIP label and git rebase -i origin/master --autosquash 😄

References

Edited by 🤖 GitLab Bot 🤖

Merge request reports