c2corg / v6_ui

UI for c2c.org v6
GNU Affero General Public License v3.0
7 stars 12 forks source link

Image infos #1535

Closed stef74 closed 7 years ago

stef74 commented 7 years ago

When you use this syntaxte : [img=857571] test [/img] the information show are not correct ...

image

stef74 commented 7 years ago

A probably link issue ... that sometime we can show exif infos (correctly display) with this step to reproduce : Cliquer sur une image dans les commentaires Cliquer sur le bouton infos ⓘ Fermer l'apperçu X

Chaque image dans les commentaires à alors toutes les infos exif affichées de la photo précédemment sélectionnée.

stef74 commented 7 years ago

An other thing if I can see image toolbar

capture

asaunier commented 7 years ago

Can be tested in this outing: https://www.camptocamp.org/outings/857542/fr/breitwangflue-flying-circus

When you use this syntaxte : [img=857571] test [/img] the information show are not correct ...

It seems the "infos" title that is automatically added is the "infos" section that is displayed in the slideshow when clicking the "i" button.

When the page is first loaded, an "infos" title is shown below the image:

capture d ecran 2017-03-03 a 14 47 52

If I click on the image, the slideshow is shown. If I click on the "i" button, metadata are shown in the slideshow. After closing the slideshow, those metadata are shown in the text of the outing:

capture d ecran 2017-03-03 a 14 45 39

An other thing if I can see image toolbar

Indeed.

In addition there is no border around the embedded images.

On the other hand all those weird behaviours cannot be observed in a route document. For instance https://www.camptocamp.org/routes/857378/fr/breitwangflue-flying-circus

capture d ecran 2017-03-03 a 14 54 55

=> borders and legend are shown as expected => no "infos" title is shown under the image => no metadata is shown under the image (OK in the slideshow).

It seems something is incorrect in the outings, creating a conflict with the slideshow!?

brunobesson commented 7 years ago

I remember we already encoutnered something similar. Don't have time to loog for it now, but it was because of the CSS applied. To function normally it expected something like .document-description, which was present only in the main field and not the others.

Maybe I corrected somethng for routes, but not for other document, e.g. outings.

asaunier commented 7 years ago

@brunobesson Thanks for the tip!

I notice that outing's description attribute uses the standard get_document_locale_text helper instead of get_document_description as for the routes: https://github.com/c2corg/v6_ui/blob/master/c2corg_ui/templates/outing/view.html#L138 https://github.com/c2corg/v6_ui/blob/master/c2corg_ui/templates/route/view.html#L131

I have tried to use the latter helper in outings as well and it seems to work. See https://github.com/c2corg/v6_ui/pull/1536

I think you have introduced this get_document_description helper. Do you remember why you had not used it for outings as well? Could you check that the change above is correct? Thanks!

brunobesson commented 7 years ago

This will work for this field, because it will add the view-details-description class to the outer section. However, this won't work in the other ones. Maybe I could have a longer look this evening, modifying the CSS could be a better option.

I think you have introduced this

I think (but am not sure), I only extended it to allow for the title option, because it was need for some fields whose title depends on context.

stef74 commented 7 years ago

For me is not correct on demo capture d ecran 2017-03-19 a 20 20 17 http://www.demov6.camptocamp.org/outings/826903/fr/pointe-de-chavasse-face-se-depuis-le-col-de-la-ramaz

asaunier commented 7 years ago

The changes done in the related PR https://github.com/c2corg/v6_ui/pull/1536/files only concern the "personal comments" attribute, not the weather or conditions attributes.

desnoes commented 7 years ago

The bug is fixed on demo