openfisca / legislation-explorer

Explore legislation formulas and parameters.
https://legislation.demo.openfisca.org
GNU Affero General Public License v3.0
26 stars 13 forks source link

Wrong page display on entity and variable naming collision #229

Open sandcha opened 3 years ago

sandcha commented 3 years ago

Hello,

I looked for the variable famille on the legislation explorer for France model: https://fr.openfisca.org/legislation/?q=famille#search-input

Here is the beginning of the search result:

Capture d’écran 2021-07-19 à 11 24 50

The first result is an entity Famille. The second result is the variable famille that I was looking for.

Here is what I expected to happen:

On selecting the second result, the variable with Cotisation famille (employeur) label, I expected to see the famille variable definition.

But here is what happened:

The famille page displays the entity description. That might be linked to the URL format as it doesn't take the class name and even if it did the uppercase of the Famille entity would be lost at the URL creation.

We could add a suffix/prefix to the entities pages but we also know that using the same name for an entity and a variable isn't a good practice. So, the solution might as well be to encourage openfisca-france to rename the famille variable. 🤔