Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor tags and SDG "tags" rendering #4345

Merged
merged 7 commits into from
Feb 4, 2021
Merged

Refactor tags and SDG "tags" rendering #4345

merged 7 commits into from
Feb 4, 2021

Conversation

javierm
Copy link
Member

@javierm javierm commented Feb 2, 2021

Objectives

  • Make the code easier to understand
  • Remove duplication

We can skip the `link_to(*options) if options` part if we accept anchor
tags in the `link_list` helper.
@javierm javierm added Refactoring SDG United Nations Sustainable Development Goals labels Feb 2, 2021
@javierm javierm self-assigned this Feb 2, 2021
@javierm javierm added this to Reviewing in Consul Democracy via automation Feb 2, 2021
@javierm javierm moved this from Reviewing to Doing in Consul Democracy Feb 2, 2021
This is more consistent with the "tag_cloud" partial name.
So now we've got a component receiving records (goals or targets) and a
related model (Debate, Proposal, ...), with optionally a link to see
more tags.

This way we simplify some logic since the `TagList` classes were dealing
with too many cases (a record is passed, a class name is passed, a limit
is passed), ... Now `TagList` only deal with the natural `TagList` case,
which is listing the tags for a record. The case where a class name is
passed is used in the `TagCloud` class.
@javierm javierm marked this pull request as ready for review February 2, 2021 21:23
@javierm javierm moved this from Doing to Reviewing in Consul Democracy Feb 2, 2021
@taitus taitus self-assigned this Feb 3, 2021
@javierm javierm changed the title Refactor SDG tag rendering Refactor tags and SDG "tags" rendering Feb 3, 2021
Consul Democracy automation moved this from Reviewing to Testing Feb 3, 2021
Base automatically changed from taggables_fix to master February 3, 2021 18:24
This rule was added so the tag list wouldn't have an extra bottom
margin. However, the rule is already applied by the `.tags` selector
inside `.budget-investment` and it was conflicting with other lists
(goals and tags) we've added to thi investments index.
@javierm javierm merged commit fe1ef43 into master Feb 4, 2021
Consul Democracy automation moved this from Testing to Release 1.3.0 Feb 4, 2021
@javierm javierm deleted the sdg_list_refactor branch February 4, 2021 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactoring SDG United Nations Sustainable Development Goals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants