Skip to content

Redesign: comments#9898

Merged
ferblape merged 199 commits intofeature/redesignfrom
feature/redesign-comments
Mar 24, 2023
Merged

Redesign: comments#9898
ferblape merged 199 commits intofeature/redesignfrom
feature/redesign-comments

Conversation

@jorgeatgu
Copy link
Copy Markdown
Contributor

@jorgeatgu jorgeatgu commented Oct 14, 2022

🎩 What? Why?

Closes #10102
Closes #10459

This PR applies the redesign to the comments module.

Also fixes a couple of bugs:

  • a bug in the characters counter refresh for screen readers
  • a bug in the comments thread reply

Pending stuff:

📷 Screenshots

♥️ Thank you!

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

@decidim/product all your feedback from #10468 has been implemented or delegated to another issue. Please make another review and feel free to open new issues, this PR is frozen except for critical bugs

Copy link
Copy Markdown
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.

I have tried to test the functionality, but is not possible, as there is an error caused by:
image

@Crashillo
Copy link
Copy Markdown
Contributor

@alecslupu when that happens, you need to restart bin/webpack-dev-server

@alecslupu
Copy link
Copy Markdown
Contributor

@alecslupu when that happens, you need to restart bin/webpack-dev-server

@Crashillo I am not using de the webpack dev server ... I just checked out the branch, removed the asset folder in my public, ran decidim:upgrade , restared the webserver ...

@Crashillo
Copy link
Copy Markdown
Contributor

In any case, comments is a branch who introduces a new pack (decidim_comments), so every single time you switch among branches, you'll have to restart the assets compiler, otherwise the manifest file won't have such entries.

When we develop, we run two tabs up: bin/rails server, and bin/webpack-dev-server (hot-reload) or bin/webpack(only compilation). Switching branches throws that error you mentioned, so restart the frontend server. Or run it once at least.

@alecslupu
Copy link
Copy Markdown
Contributor

running webpack-dev-server ... i get this error:

ERROR in ./decidim/decidim-comments/app/packs/stylesheets/comments.scss (./decidim/decidim-comments/app/packs/stylesheets/comments.scss.webpack[javascript/auto]!=!./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./packages/webpacker/src/loaders/decidim-sass-loader.js!./decidim/decidim-comments/app/packs/stylesheets/comments.scss)
Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
SyntaxError

(64:4) <css input> The `first:[&_a[href^="/profile"]>span]:z-10` class does not exist. If `first:[&_a[href^="/profile"]>span]:z-10` is a custom class, make sure it is defined within a `@layer` directive.

  62 | 
  63 |   &__header{
> 64 |     @apply flex items-center gap-x-2 mb-2 -ml-[calc(1.5rem+.75rem)] relative first:[&_a[href^="/profile"]>span]:z-10;
     |    ^
  65 | 
  66 |     &--edited{

ERROR in ./decidim/decidim-comments/app/packs/stylesheets/comments.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
HookWebpackError: Module build failed (from ./node_modules/postcss-loader/dist/cjs.js):
SyntaxError

I will reinstall my webpacker, to make sure is not that the root cause of my errors.

@ferblape
Copy link
Copy Markdown
Contributor

If you re-create the development_app it works, maybe you should try.

Anyway we have an issue with the commit 9f4ccd7 which broke many tests, we are fixing it right now.

@alecslupu
Copy link
Copy Markdown
Contributor

If you re-create the development_app it works, maybe you should try.

Anyway we have an issue with the commit 9f4ccd7 which broke many tests, we are fixing it right now.

I got it working ... was a Mishap on my end ( I use multiple containers and something got mangled by a config) ...
I was just getting the same error as you did ... ActionView::Template::Error (undefined method flag_modal'` .. waiting for fix. :)

@ferblape
Copy link
Copy Markdown
Contributor

@alecslupu ready to review again

@alecslupu
Copy link
Copy Markdown
Contributor

When a comment is being moderated the view is rendered as follows:
image

#
# require "spec_helper"
#
# describe "Report a debate", type: :system 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.

I would like to remove this comment, even though it means failing pipeline

Copy link
Copy Markdown
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.

Thanks for your work. Overall a good PR, with few requests.

  • Please make sure you do not remove unnecessary specs.
  • In the action menu of comments you have 2 ifs checking the same thing, and maybe you could put in a single statement
  • Also make sure the comment moderated is in the right place.

@ferblape
Copy link
Copy Markdown
Contributor

When a comment is being moderated the view is rendered as follows: image

That's something solved in staging, don't have to worry:

https://decidim-redesign.populate.tools/processes/smile-cutting/f/19/posts/10

Screenshot 2023-03-20 at 11 51 45

@alecslupu
Copy link
Copy Markdown
Contributor

That's something solved

@ferblape this is NOT solved ...

Check here : https://decidim-redesign.populate.tools/processes/smile-cutting/f/19/posts/10

image

@ferblape ferblape requested a review from alecslupu March 22, 2023 10:24
@ferblape
Copy link
Copy Markdown
Contributor

Ready to re-review @alecslupu, ping me if you want clarification about the commented specs you want to remove

@ferblape
Copy link
Copy Markdown
Contributor

@alecslupu could you review this today? we need some stuff from this PR in the filters branch

@alecslupu
Copy link
Copy Markdown
Contributor

alecslupu commented Mar 24, 2023 via email

@alecslupu
Copy link
Copy Markdown
Contributor

Team, thanks for the work already done. There are some improvements that could be done:

  1. The emoji box is not aligned
  2. There is a refresh happening in the comments, as per below video, that is not happening all the time.
Screencast.from.24.03.2023.09.43.41.webm

Copy link
Copy Markdown
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.

Thanks for the work already done,

Please see my comment

@ferblape ferblape merged commit a01210c into feature/redesign Mar 24, 2023
@ferblape ferblape deleted the feature/redesign-comments branch March 24, 2023 09:38
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.

Integrate comments

5 participants