PUGX / badge-poser

The PHP badges, renders some badges for your readme with the packagist information.
https://poser.pugx.org
MIT License
476 stars 93 forks source link

permalink disappear when a new search is done #107

Closed liuggio closed 10 years ago

liuggio commented 10 years ago

when a new search is done, the permalink of the repository disappears.

There's a javascript at /src/PUGX/BadgeBundle/Resources/public/js/snippet.js

that replaces the content of an h2 deleting the permalink.

giorrrgio commented 10 years ago

I think we need a rework

liuggio commented 10 years ago

if you are not going to work on it, please could you provide your suggestions?

hpatoio commented 10 years ago

What's exactly the problem ? Where is the permalink of the repository ?

giorrrgio commented 10 years ago

@hpatoio : this is the permalink;

DOM elements are now populated via js by a naming convention that matches names from the JSON attributes with the ids in the markup. This becomes weak if we need exceptions (like in this case: populate the title part in the #repository_html h2 and regenarate the anchor inside it with the proper url). A solution could be removing the naming convention and rewriting the generateSnippets function.

hpatoio commented 10 years ago

Ok, Got it ! I'll work on it !

liuggio commented 10 years ago

:) what do you think to also rename the permalink: now is #badges could be renamed to #repository or somethink else...

hpatoio commented 10 years ago

Can we close this ?

liuggio commented 10 years ago

thanks