Skip to content

SCENARIO: Image names may contain special character (see #360).#410

Open
CocoChart wants to merge 3 commits into
mainfrom
fix-360
Open

SCENARIO: Image names may contain special character (see #360).#410
CocoChart wants to merge 3 commits into
mainfrom
fix-360

Conversation

@CocoChart
Copy link
Copy Markdown
Collaborator

Co-authored-by:
Enguerrand LUCAT @Engu-s
Lakhdar Berache @aminssutt

We hereby grant to Hyperglosae maintainers the right to publish our contribution under the terms of any licenses the Free Software Foundation classifies as Free Software Licenses.

@CocoChart CocoChart force-pushed the fix-360 branch 6 times, most recently from d122b87 to 7a4aec4 Compare March 31, 2026 15:31
Copy link
Copy Markdown
Member

@benel benel left a comment

Choose a reason for hiding this comment

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

Thank you @CocoChart @Engu-s @aminssutt for your contribution.

Comment thread frontend/scenarios/add_picture.feature Outdated
Et une session active avec mon compte
Quand j'essaie d'ajouter une image à une glose
Alors je vois l'image "<IMAGE DESCRIPTION>" dans la glose
Et je ne vois pas le texte alternatif dans la glose
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That should work. But maybe you could add a string parameter to tell what the hidden alternative text is supposed to be.

@benel
Copy link
Copy Markdown
Member

benel commented Apr 28, 2026

Hmm, the test pass although the software behavior is not fixed yet... 🤔

@CocoChart
Copy link
Copy Markdown
Collaborator Author

Hmm, the test pass although the software behavior is not fixed yet... 🤔

@benel The problem is that the bug only occurs when the name of the image has a special character, which means it is a specific value of the string parameter in the scenario.
Should we add a scenario and test for this specific value, or change the existing ones with a parameter that makes the test fail ?

Co-authored-by: Enguerrand LUCAT <enguerrand.lucat@gmail.com>
Co-authored-by: Lakhdar Berache <lakhdar.berache@utt.fr>
Co-authored-by: Enguerrand LUCAT <enguerrand.lucat@gmail.com>
Co-authored-by: Corentin CHARTIER <corentinchartier334@gmail.com>
Co-authored-by: Berache Lakhdar <lakhdarberache@gmail.com>
Co-authored-by: Chartier Corentin <corentinchartier334@gmail.com>
@CocoChart CocoChart marked this pull request as ready for review May 12, 2026 14:45
Copy link
Copy Markdown
Member

@benel benel left a comment

Choose a reason for hiding this comment

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

Thank you @CocoChart @Engu-s @aminssutt for your updates.

Please have a look at the comments below.

Comment thread docs/#architecture.png
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hmm. By doing this you will break the figure inclusion in the README.

  • You may instead copy this file with a different name.
  • Moreover, I suppose there are very few people naming a file with a starting hash. You could instead use the hash a symbol for "number" (as it is done frequently in English).

Hence you should preserve docs/architecture.png and copy it as docs/architecture#1.png. OK ?

Quand j'essaie d'ajouter une image à une glose
Alors je vois l'image "<IMAGE DESCRIPTION>" dans la glose
Quand j'essaie d'ajouter une image "#architecture.png" à une glose
Alors je vois l'image "#architecture.png" dans la glose
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See the previous comment on a more realistic name that includes a hash.

const arrayBuffer = reader.result;

fetch(`${service}/${id}/${attachment.name}`, {
fetch(`${service}/${id}/${attachment.name.split('#').join('%23')}`, {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

split then join? Well it works, but why not simply use replaceAll?

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.

4 participants