Skip to content

Conversation

@TheMBeat
Copy link
Contributor

@TheMBeat TheMBeat commented Nov 30, 2020

Fix #415

@codecov
Copy link

codecov bot commented Nov 30, 2020

Codecov Report

Merging #418 (ac86a64) into master (a907126) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##             master    #418   +/-   ##
========================================
  Coverage      0.95%   0.95%           
  Complexity      401     401           
========================================
  Files            13      13           
  Lines          1263    1263           
========================================
  Hits             12      12           
  Misses         1251    1251           
Flag Coverage Δ Complexity Δ
integration 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
unittests 0.95% <0.00%> (ø) 0.00 <0.00> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ Complexity Δ
lib/Controller/RecipeController.php 0.00% <0.00%> (ø) 14.00 <0.00> (ø)

Copy link
Collaborator

@christianlupus christianlupus left a comment

Choose a reason for hiding this comment

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

Why are two different SVG files required? The idea was to have a single well-scalable image.

Additionally, it might be a good idea to pop things up with CSS+Vue changes so that the existing images are replaced by an SVG image + gray background of appropriate size.

Additionally, you should sign-off the commits to make DCO happy.

@TheMBeat
Copy link
Contributor Author

TheMBeat commented Dec 1, 2020

One SVG makes more Sense. I hadn't thought through to the end. My mistake. I'll improve it.

@christianlupus
Copy link
Collaborator

I will have a look later as I am quite busy currently due to day-time job.

Copy link
Collaborator

@christianlupus christianlupus left a comment

Choose a reason for hiding this comment

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

There is a bug in the PR. When opening the cookbook app, I get these errors in the console:
Screenshot_20201206_170045

@TheMBeat
Copy link
Contributor Author

TheMBeat commented Dec 6, 2020

I look at this tomorrow.

@christianlupus christianlupus marked this pull request as draft December 6, 2020 16:39
Copy link
Contributor Author

@TheMBeat TheMBeat left a comment

Choose a reason for hiding this comment

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

@christianlupus are the changes ok for you now?

<li v-for="(recipe, index) in filteredRecipes" :key="recipe.recipe_id" v-show="recipeVisible(index)">
<router-link :to="'/recipe/'+recipe.recipe_id">
<img v-if="recipe.imageUrl" :src="recipe.imageUrl">
<img v-if="$store.state.recipe.image" :src="recipe.imageUrl">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@christianlupus I think the bug comes from this line.

@TheMBeat TheMBeat marked this pull request as ready for review December 9, 2020 06:35
Copy link
Collaborator

@christianlupus christianlupus left a comment

Choose a reason for hiding this comment

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

Looks good and I see no issues here.

@christianlupus christianlupus merged commit b3522a8 into nextcloud:master Dec 9, 2020
@Teifun2
Copy link
Collaborator

Teifun2 commented Apr 9, 2022

This leads to a lot of problems in my App development.

The browser is totally happy if instead of a PNG he receives a SVG. But for normal App Components this always results in crashes deep in the library. As it gets a proper response but cannot parse the response into an image of any type.

Would it be ok if i changed the code so that the RecipeController returns 404 if no image is found. And the frontend itself adds the SVG in these cases? This seems a much cleaner "API" solution.

@christianlupus
Copy link
Collaborator

@Teifun2 if this needs more discussion, we might be better of in a new issue instead of this PR.

Apart from that, can't you check the Content-Type header before?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace icons by SVG(s)

3 participants