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

Fix timeline entries display in result page #13033

Merged
merged 7 commits into from
Jul 11, 2024

Conversation

andreslucena
Copy link
Member

@andreslucena andreslucena commented Jun 21, 2024

🎩 What? Why?

With the redesign we have removed the Timeline entries from a Result page in Accountability. This PR fixes it.

Although the code was showing children results as timeline entries, these are different things. Also, to clarify, as a Subresult can't have more children results, it doesn't make sense to show them in this page.

After diving in Legacy and seeing how the Ancient people wanted this to work (and specially talking with @carolromero a lot about this feature and this page), we have the following result:

  • If a result has a Timeline, then there's a tab called "Project evolution" with this timeline
  • If a result has Subresults (aka Children results), then there's a tab called "Subresults" where there are links to these other results. As we've lost the breadcrumb in Accountability, we add the link to the parent result in the breadcrumb Menu

Testing

  1. Sign in as admin
  2. Go to a parent Result (with subresults) in an accountability component in the admin
  3. Add a timeline entry
  4. See the public (show) page for this Result. See that you have two tabs, one with the "Project evolution" and another one with the "Subresults"
  5. Click in the Subresults tab and click in a Subresult
  6. See that you have the parent result link in the breadcrumb

📷 Screenshots

Project evolution tab in a Result page
Subresults tab in a Result page
Link to the parent Result page in the children result page

♥️ Thank you!

@andreslucena andreslucena added the type: fix PRs that implement a fix for a bug label Jun 21, 2024
github-actions[bot]
github-actions bot previously approved these changes Jun 21, 2024
github-actions[bot]
github-actions bot previously approved these changes Jun 21, 2024
@andreslucena
Copy link
Member Author

In a meeting with @decidim/product we mentioned that we need to actually show the result children too in this page. I'll mark this as draft until I fix that

@andreslucena andreslucena marked this pull request as draft July 4, 2024 11:18
@andreslucena andreslucena marked this pull request as ready for review July 10, 2024 09:43
@alecslupu alecslupu added this to the 0.29.0 milestone Jul 11, 2024
Copy link
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

👍

@alecslupu alecslupu merged commit 23ac687 into develop Jul 11, 2024
114 checks passed
@alecslupu alecslupu deleted the fix/accountability-timeline branch July 11, 2024 07:23
@andreslucena
Copy link
Member Author

Adding the no-backport as it was already backported to v0.28 and this was changed with the redesign (so it wasn't happening in v0.27)

@andreslucena andreslucena added the no-backport Pull Requests that should not be backported label Jul 12, 2024
mllocs pushed a commit that referenced this pull request Jul 18, 2024
* Fix timeline entries display in result page

* Fix rspec description (copy and paste error)

* Prevent XSS in timeline entries

* Add spec

* Show subresults in result page

* Link back to parent result on subresults page

* Prevent showing an empty element in the breadcrumb on the parent result page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: accountability module: core no-backport Pull Requests that should not be backported type: fix PRs that implement a fix for a bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants