Skip to content

Implement drawers with turbo in accountability#9884

Closed
entantoencuanto wants to merge 162 commits intodevelopfrom
feature/redesign-accountability-turbo
Closed

Implement drawers with turbo in accountability#9884
entantoencuanto wants to merge 162 commits intodevelopfrom
feature/redesign-accountability-turbo

Conversation

@entantoencuanto
Copy link
Copy Markdown
Contributor

@entantoencuanto entantoencuanto commented Oct 5, 2022

Closes #10096
Closes #10090

🎩 What? Why?

This PR implements the drawers feature using Turbo:

  • When a user clicks on a result on index the drawer is shown and the path is replaced with the show of the item.
  • When the user closes the drawer the index path is recovered including the existing previous filter params
  • If the user goes directly to the show of a result the drawer is shown and the index without results is loaded in the background. When the user closes the drawer the path is replaced with the index and the results list is refreshed
  • When the drawer is opened from the index the h1 of the index is changed to h2 and there is only an h1 inside the drawer. When the drawer is closed the h1 of the index is recovered

Due to Turbo way of working, scripts can't be loaded inside the <body> tag, because the body is reloaded on each request. This PR also moves JS back to the <head> section to fix #10090

Notice that although the thread of comments is included in the drawer, it's not working yet, so comments shouldn't be reviewed to approve this PR. Comments are being redesigned in #9898

📌 Related Issues

Testing

Describe the best way to test or validate your PR.

  • Visit a process with accountability enabled
  • Browse the list of results
  • Open and close different results
  • Use the close button to close it
  • Click outside the drawer to check it's closed
  • Copy the URL of a result in a new tab, it should open the drawer

📷 Screenshots

Please add screenshots of the changes you're proposing
Description

♥️ Thank you!

@entantoencuanto entantoencuanto added the project: redesign Barcelona City Council contract label Oct 5, 2022
@ferblape
Copy link
Copy Markdown
Contributor

@NilHomedes @decidim/product drawers can be reviewed again.

We have removed (temporally) comments from drawers, it was causing some weird side effects, and we want you just to focus on the drawer itself.

@furilo
Copy link
Copy Markdown
Contributor

furilo commented Dec 21, 2022

The versions browsing is pending, we leave it to #10174

NilHomedes
NilHomedes previously approved these changes Dec 22, 2022
Copy link
Copy Markdown
Member

@NilHomedes NilHomedes left a comment

Choose a reason for hiding this comment

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

Drawer behaviour now looks good to me.

Just to note: The back button is missing. As we talked in #10107

Copy link
Copy Markdown
Contributor

@ahukkanen ahukkanen left a comment

Choose a reason for hiding this comment

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

This seems fine for me but I don't think the dynamic heading is a good idea.

Please also see the other comment regarding the versions link. It seems broken but not sure if it's supposed to work either.

@furilo furilo mentioned this pull request Dec 22, 2022
@furilo
Copy link
Copy Markdown
Contributor

furilo commented Dec 23, 2022

Please @Crashillo fix conflicts so @ahukkanen can merge this.

@entantoencuanto
Copy link
Copy Markdown
Contributor Author

This PR is closed in favor of #9830, since #9830 contains all the code introduced by it

@ferblape ferblape mentioned this pull request Feb 9, 2023
2 tasks
@ferblape ferblape deleted the feature/redesign-accountability-turbo branch July 4, 2023 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

project: redesign Barcelona City Council contract

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Finish drawer implementation in Meetings Turbo warning while running system specs

8 participants