Skip to content

Add filter options to Timeline and Activity tabs#5845

Merged
jesusdb merged 35 commits intodevelopfrom
feature/filter-options
May 8, 2020
Merged

Add filter options to Timeline and Activity tabs#5845
jesusdb merged 35 commits intodevelopfrom
feature/filter-options

Conversation

@jesusdb
Copy link
Copy Markdown
Contributor

@jesusdb jesusdb commented Mar 10, 2020

🎩 What? Why?

This feature adds a filter on the user's timeline and activity tabs from their public profile. It allows the user to filter the activities depending on the resource type selected.

📌 Related Issues

📋 Subtasks

  • Add CHANGELOG entry
  • Add tests

📷 Screenshots

Timeline:
imagen
Activity:
imagen
Working with pagination:
imagen

@jesusdb jesusdb changed the title [WIP] Add filter options to Timeline and Activity tabs Add filter options to Timeline and Activity tabs Mar 10, 2020
@jesusdb jesusdb marked this pull request as ready for review March 10, 2020 14:47
@tramuntanal tramuntanal linked an issue Mar 11, 2020 that may be closed by this pull request
2 tasks
@jesusdb jesusdb requested a review from ivan-mr March 12, 2020 11:19
@andreslucena
Copy link
Copy Markdown
Member

Just a quick change, can we add a message for the cases where there isn't any content? For instance if I go to admin@example.org user profile and filter by Inititative I see this:

imagen

I don't know if there is any content or there was an error or what's really happening there.

I suggest that we show somekind of message here so it's clearer:

imagen

I don't remember if we already do something like that when a participant has just been registered and doesn't have any content.

@jesusdb
Copy link
Copy Markdown
Contributor Author

jesusdb commented Mar 13, 2020

Hello @andreslucena,

All right, I'm adding a message when the result is empty. But shouldn't the word "contents" be in singular? ("We couldn't find any content with this criteria")

@Leusev Leusev self-requested a review March 26, 2020 13:28
Copy link
Copy Markdown
Contributor

@Leusev Leusev left a comment

Choose a reason for hiding this comment

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

There's a changelog file conflict, could you check please?
Apart from commented above, very good job @jesusdb !

Leusev
Leusev previously approved these changes Apr 3, 2020
Copy link
Copy Markdown
Contributor

@Leusev Leusev left a comment

Choose a reason for hiding this comment

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

Well done @jesusdb

Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

Great job @jesusdb , I've left some suggestions 😄

@andreslucena andreslucena linked an issue Apr 27, 2020 that may be closed by this pull request
@jesusdb jesusdb requested review from Leusev and tramuntanal April 27, 2020 13:57
Copy link
Copy Markdown
Contributor

@Leusev Leusev left a comment

Choose a reason for hiding this comment

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

I've seen you fixed form_builder issue, well done @jesusdb :)
In other hand, I've seen you changed the way to get resources in filter as Oliver asked you.
Only one question more, I've seen you made the query with you put .last.underscore to obtain the texts in that way:
image
but in spec test, only with option .last:
image
Is that correct?
Thanks!

@jesusdb
Copy link
Copy Markdown
Contributor Author

jesusdb commented Apr 28, 2020

Hi @Leusev, it says you requested changes and it doesn't let me answer your comment directly. Yes that's correct; the spec doesn't have the .underscore because I use that to translate the text in development and production, but not in the tests.

@jesusdb jesusdb requested a review from Leusev April 28, 2020 10:47
Leusev
Leusev previously approved these changes Apr 28, 2020
Copy link
Copy Markdown
Contributor

@tramuntanal tramuntanal left a comment

Choose a reason for hiding this comment

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

I think resource_types spec variables are not useful, and can be removed.

create(:dummy_resource, component: component, published_at: Time.current)
end

let!(:resource_types) do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this being used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed it so now uses a specific array with the resource_types requested. The spec uses that variable

create(:action_log, action: "publish", visibility: "all", resource: resource3, organization: organization)
end

let!(:resource_types) do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is this being used?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I changed it so now uses a specific array with the resource_types requested. The spec uses that variable

tramuntanal
tramuntanal previously approved these changes May 7, 2020
@Leusev Leusev self-requested a review May 8, 2020 08:38
@jesusdb jesusdb merged commit 183dd87 into develop May 8, 2020
@jesusdb jesusdb deleted the feature/filter-options branch May 8, 2020 08:40
ace pushed a commit to aspgems/decidim that referenced this pull request May 12, 2020
* feature/initiatives_search_fo_new_design:
  Updates changelog
  Harmonizes the design of initiatives search in FO
  New question type "Matrix" in questionnaires (decidim#5948)
  Add filter options to Timeline and Activity tabs (decidim#5845)
  Remove relations between user and spaces on destroy account command (decidim#6041)
  Explain how to initialize a custom oauth2 client provider (decidim#6055)
  Reenable main tests on Crowdin PRs (decidim#6076)
  Enum and readonly component settings (decidim#6001)
  New Crowdin translations (decidim#6066)
  Add missing notifications (decidim#5906)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add filter options to Timeline and Activity tabs EPIC: Improvements to Timeline and Activity tabs

4 participants