Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Add a card component in Vue.js #546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jilljenn
Copy link
Member

\o/

🚀🚀🚀

@@ -113,8 +113,7 @@ def get_card(request: Request, category: str, slot_sort_type: str):
rated_works = current_user_ratings(request)
slot_type_chosen = SlotCardTypes[card_slot_query['slot_type']]
queryset = (
slot_dispatchers[slot_type_chosen](queryset)
.exclude(id__in=list(rated_works))
slot_dispatchers[slot_type_chosen](queryset.exclude(id__in=list(rated_works)))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ça a l'air de rien comme ça mais c'est pour éviter d'avoir une liste vide pour DPP xD

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ceci devrait aller dans un commentaire dans le code et pas sur la PR ;)

},
methods: {
init() {
$.getJSON('/api/cards/anime/dpp', works => this.works = works);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ceci est d'une beauté immense.

<h2>Notez vos anime et mangas favoris…</h2>
<div id="works" class="row">
<div class="col-xs-12 cards-grid">
<card v-for="(work, index) in works" v-bind:work="work" :key="work.id">
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La magie.

@jilljenn
Copy link
Member Author

  • Reste à gérer NSFW.
  • Il serait évidemment préférable de gérer les clicks + mises-à-jour en Vue.js plutôt qu'en vote.js xD

@codecov
Copy link

codecov bot commented Feb 17, 2018

Codecov Report

Merging #546 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #546      +/-   ##
==========================================
+ Coverage   74.84%   74.94%   +0.09%     
==========================================
  Files          80       73       -7     
  Lines        4938     3504    -1434     
==========================================
- Hits         3696     2626    -1070     
+ Misses       1242      878     -364
Impacted Files Coverage Δ
mangaki/mangaki/api/cards.py 96.07% <100%> (ø) ⬆️
mangaki/mangaki/urls.py
mangaki/mangaki/views.py
mangaki/mangaki/models.py
mangaki/mangaki/tasks.py
mangaki/mangaki/admin.py
mangaki/mangaki/__init__.py
mangaki/mangaki/apps.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 138ae80...d91f9e8. Read the comment docs.

@@ -168,6 +168,7 @@

<script src="{% url 'js_reverse' %}" type="text/javascript"></script>
<script src="/static/js/jquery-latest.min.js"></script>
<script src="https://unpkg.com/[email protected]/dist/vue.min.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use a mechanism to enable debug builds rather than min builds in some cases, like my PR (which introduces Vue.js) did.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was inelegant.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it depends on your own definition of elegant. But, I, for sure, would like a mechanism to be able to debug Vue.js using Vue.js DevTools and using minimal builds will prevent me from doing it, so I think it is a bad idea, it does not cost anything to have a flag to say: "load the debug build" or "load the min build", we could even rely on DEBUG rather than using a DEBUG_VUEJS like I did. It's up to you.

@RaitoBezarius RaitoBezarius changed the title Add a card component in Vue.js WIP: Add a card component in Vue.js Feb 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants