regardscitoyens / the-law-factory

Track the french law-making process
https://www.lafabriquedelaloi.fr
GNU Affero General Public License v3.0
75 stars 15 forks source link

[WIP] Refactor amendments rendering without SVG nor d3 #129

Closed njoyard closed 8 years ago

njoyard commented 8 years ago

This PR is a rewrite of #128 on the refactor-v2 branch.

It features a complete rewrite of the amendments rendering, no longer using d3 or svg. Rendering is done by AngularJS using the template, directly.

Finished :

Todo:

Postponed :

Comments welcome, angularjs newbie here :P

fmassot commented 8 years ago

Now that all mod2 is in a directive, I would isolate this directive in a separate file. Maybe in modules/mod2-directive.js ?

njoyard commented 8 years ago

As discussed on irc, directive isolation/renaming will be done in a future PR.

Did some more work and rebased on the tip of the branch. I also updated the PR description with a to-do list. Very close to being finished \o/

RouxRC commented 8 years ago

Attention à l'ordering des sujets des amendements: à ajouter à https://github.com/njoyard/the-law-factory/blob/angular-amendements-v2/public/js/directives.js#L175 cf https://github.com/njoyard/the-law-factory/commit/0200b09daf526656d145ab90e4b4017c5653d5a5#diff-128ef7b2495e9cb0f9b5ef35c370c7e8L74

RouxRC commented 8 years ago

Sinon pour gérer le clic sur les légendes, on utilisait un autre slug par groupe et par sort sur chaque boite d'amendement : https://github.com/njoyard/the-law-factory/commit/0200b09daf526656d145ab90e4b4017c5653d5a5#diff-128ef7b2495e9cb0f9b5ef35c370c7e8L302

On avait aussi des classes first-art et first-art-s pour les premiers de chaque, mais pas sûr de voir si et à quoi elles servaient.

RouxRC commented 8 years ago

and FYI, I allowed myself to add a few comments within the todo list above ;)

njoyard commented 8 years ago

Attention à l'ordering des sujets des amendements

Already done here https://github.com/regardscitoyens/the-law-factory/pull/129/files#diff-89636a6c0099086ea4845ca28976da86R196

Sinon pour gérer le clic sur les légendes

Legend click should do something? Does not seem to do anything on prod (or maybe not with all laws?)

On avait aussi des classes first-art et first-art-s

Yeah, I missed that. They're used by the tutorial.

rename "mod2" occurences everywhere (templates/mod2.html & setMod2Size at least)

As discussed with @fmassot, this will be in a future PR that reorganizes all modX directives

RouxRC commented 8 years ago

and attaching #106 as well here

njoyard commented 8 years ago

Okay, I'll reimplement that then. And github is weird with links to lines of code sometimes...