-
Notifications
You must be signed in to change notification settings - Fork 35
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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))) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
La magie.
|
Codecov Report
@@ 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 Continue to review full report at Codecov.
|
@@ -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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
\o/
🚀🚀🚀