Repository navigation
Show tag cloud in search results - #375
Conversation
ead5aea to
5c50b46
Compare
christianlupus
left a comment
There was a problem hiding this comment.
The backend code looks good to me. There is no way to use GROUP_CONCAT as we are not based on MySQL but a generic SQL driver.
Regarding the Vue.JS I cannot confirm everything as I am not an expert.
One thing I found during testing the functionality:
When one filters the search result by keyword further, it is possible to generate an empty result. This might be surprising for the user. We might want to hide all keywords that are no longer present in the currently filtered view. However, I suggest to keep the current behavior and open an issue/additional PR to solve that bug. Otherwise we might never finish this PR.
| } | ||
| }) | ||
| } | ||
| }) |
There was a problem hiding this comment.
This will create a huge list of keywords to filter for. If there are many recipes visible, this might be more then fitting in one row. I have not tested but we might have to think of this.
There was a problem hiding this comment.
That will depent how many recipes you have in your cookbook. Some pages set a certain amount of keywords to the tag per recipe. Of course, there will be similarities but for a few 100 recipes the amount of keywords might become significant. But you are right, this might be ok if done later.
| ul { | ||
| ul.keywords { | ||
| display: flex; | ||
| flex-wrap: wrap; |
There was a problem hiding this comment.
This will make the comment swap around.
There was a problem hiding this comment.
I鈥檓 not sure, which comment you mean? What do you mean by swap around?
There was a problem hiding this comment.
Sorry, typo. I meant wrap.
There was a problem hiding this comment.
Yes, but that鈥檚 good, isn鈥檛 it? If the keywords don't fit in a single line, the user is still able to see them as in this picture.
| li:hover, .active li:hover { | ||
| border: 1px solid var(--color-primary); | ||
| } | ||
| </style> |
There was a problem hiding this comment.
yes and no. it should be identical 馃
There was a problem hiding this comment.
True, but for the merging we might have a close look for conflicts. No big deal if it's only whitespace or the like.
I ignored your suggestion and implemented your idea of disabling keywords which are not contained in visible recipes! |
|
Apart from my inability to review the Vue code in detail, it seems to work for me ;-) |
|
I'm not sure why, but I am not able to test this PR out. When I try to search for recipes, I get the error This in turn triggers an uncaught type error Am I the only one having this problem? Maybe it's something with my setup? |
|
I don鈥檛 think I can reproduce this. Should I see this in the server logs? I鈥檓 using @christianlupus docker setup. Where would I have to look? Also, I did not touch the |
|
Probably something weird going on with my dev setup. I can see how it works on the index page though and it looks cool :) There are some inconsistencies with line endings in the script sections, but if you wouldn't mind removing those few semicolons here and there, I would definitely give this a thumbs up! |
|
I removed the semicolons I could find from the updated vue components. Jumping back and forth between languages is annoying 馃槗 |
Signed-off-by: Sebastian Fey <[email protected]>
Signed-off-by: Sebastian Fey <[email protected]>
Signed-off-by: Sebastian Fey <[email protected]>
Signed-off-by: Sebastian Fey <[email protected]>
Signed-off-by: Sebastian Fey <[email protected]>
Signed-off-by: Sebastian Fey <[email protected]>
Signed-off-by: Sebastian Fey <[email protected]>
78bb0f3 to
4ca22cf
Compare

Regarding #188.
Added tag cloud between the breadcrumb nav and the recipe overview grid. What it currently does, is
Things to consider
GROUP_CONCATworking with the QueryBuilder. This might be more efficient than my workaround, so if anyone knows how to get this working - feel free to contribute!Feedback, as always, welcome.