Skip to content

Redesign: author tooltip#10438

Merged
ferblape merged 40 commits intofeature/redesignfrom
feature/redesign-author-tooltip
Mar 29, 2023
Merged

Redesign: author tooltip#10438
ferblape merged 40 commits intofeature/redesignfrom
feature/redesign-author-tooltip

Conversation

@Crashillo
Copy link
Copy Markdown
Contributor

@Crashillo Crashillo commented Feb 24, 2023

🎩 What? Why?

Refactor the way the user tooltip is working: from now on it acts like a popover, it's appended to the body tag and placed via javascript.

Also it includes a refactor of the tooltip javascript trigger functions, to be able to handle both plain text tooltips and complex html structures like this one.

Includes also four different positions for the tooltip: top, right, left, and bottom (default)

All the author views in the cell has been simplify as well, and updated the respective uses.

All tailwind CSS classes has been extracted to files.

Closes #10360

📷 Screenshots

Depending the chosen layout to display the user, we can have:

imagen

imagen
imagen

  • Default design: Tooltips will be also available in the L & G cards, but they're not included in this PR, so they will available once such cards are finished.

imagen

@Crashillo Crashillo changed the base branch from develop to feature/redesign February 24, 2023 13:52
@Crashillo Crashillo added the project: redesign Barcelona City Council contract label Feb 24, 2023
@Crashillo Crashillo marked this pull request as ready for review March 2, 2023 16:53
@Crashillo Crashillo requested review from ferblape and furilo March 2, 2023 17:47
Copy link
Copy Markdown
Contributor

@ferblape ferblape left a comment

Choose a reason for hiding this comment

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

Codewise looks ok, but there are many broken tests. I'll ask @entantoencuanto to fix them

@Crashillo
Copy link
Copy Markdown
Contributor Author

Crashillo commented Mar 10, 2023

The expectation is that the tooltip will appear when hovering over the username, and not that it has some sort of buffer zone around it. Can we change this? thanks!

That's kinda tricky. As I commented at the OP, we've several versions of the author: avatar, compact and default. All versions trigger the tooltip, but here comes the problem: where should we display it?

  • For the avatar type, it's crystal clear: the image triggers the tooltip, and this one is placed beneath such image.
  • For compact and default, it ain't so clear: who triggers the tooltip? the avatar? the name? both? or the whole set avatar+name? and in the same line, where should we place the tooltip? beneath the avatar? or the name? or beneath both elements or the whole set?

For instance, github, in some cases, displays the tooltip on different elements, so you can place beneath the avatar AND the name:

Screencast.from.10-03-23.14.54.46.mp4

Currently, we chose the whole set as trigger instead, due to the following issue: the tooltip has interactive content, that is, the follow button. So if you change the follow status, the markup for such tooltip changes BUT the rest of tooltips don't change. Therefore, when you have two trigger elements (avatar and name) so close each other, it's quite easy to realise that something is wrong. Having only one trigger element solves (slightly) that problem.

Look at the following example: I click on the follow button, so the text button changes. But if I trigger another tooltip, it looks like nothing has happened. Even I open the previously modified button, nothing has happened.

Screencast.from.10-03-23.15.04.02.mp4

So, how do you prefer to deal with? Keeping in mind the different versions, which should we set as the trigger element and where place the tooltip?

@entantoencuanto entantoencuanto removed their assignment Mar 13, 2023
@Crashillo
Copy link
Copy Markdown
Contributor Author

I didn't get you good last friday, now I did some stuff to really hide the tooltip, let me know if that works to you

@ferblape ferblape requested review from a team and carolromero March 14, 2023 03:21
@carolromero
Copy link
Copy Markdown
Member

@Crashillo working great now, thanks!

@ferblape
Copy link
Copy Markdown
Contributor

@Crashillo could you review the merge conflict?

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

@Crashillo, in order to start reviewing, i need the conflict to be resolved.

@ferblape
Copy link
Copy Markdown
Contributor

@Crashillo, in order to start reviewing, i need the conflict to be resolved.

@alecslupu done

* feature/redesign: (94 commits)
  Fix test
  Finalize word standardization (#10557)
  Fix iframes stripped from admin entered proposals, meetings and debates (#10466)
  Fix ImageMagick errors when trying to identify image dimensions (#10343)
  Add required to proposal limit field in Proposal component (#10525)
  Standardize the format of the words "is not" (#10511)
  Standardize the format of the words "has not" (#10510)
  Standardize the format of the words "will not" (#10509)
  Make buttons respect the organizations' primary color (#10526)
  Fix flaky spec for questionnaire templates (#10544)
  Remove the deprecated `optional` option from the file upload modal (#10542)
  Standardize the format of the words "does not" (#10505)
  Standardize the format of the words "was not" (#10514)
  Add Procfile support (#10519)
  Standardize the format of the words "do not" (#10513)
  Change the `optional` option to `required` at participatory texts (#10498)
  Fix destroying scope types that have been associated with processes (#10496)
  Fix dynamic upload file field required indicator + make option naming consistent (#10497)
  Standardize the format of the words "should not" (#10515)
  Standardize the format of the words "were not" (#10516)
  ...
@ferblape
Copy link
Copy Markdown
Contributor

ping @decidim/maintainers, could you please review this?

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.

One single question, that does not block the PR.

@alecslupu
Copy link
Copy Markdown
Contributor

alecslupu commented Mar 27, 2023

I have encountered this kind of tooltip (no follows information) on the "last proposals" widget on participatory process homepage ...

image

@Crashillo
Copy link
Copy Markdown
Contributor Author

I have encountered this kind of tooltip (no follows information) on the "last proposals" widget on participatory process homepage

I don't get you, could you please share the url or provide further details? Look what I tried in that homepage, moving down the hero block to let that happen, but as you may notice, it works as expected

Screencast.from.27-03-23.15.57.02.mp4

@ferblape ferblape merged commit 208c421 into feature/redesign Mar 29, 2023
@ferblape ferblape deleted the feature/redesign-author-tooltip branch March 29, 2023 02:47
entantoencuanto added a commit that referenced this pull request Mar 29, 2023
…content-blocks

* feature/redesign: (187 commits)
  Redesign: author tooltip (#10438)
  Redesign: pending things of the public profile (#10472)
  Redesign: card L link whole card (#10554)
  strip links from cards, standarize author cell (#10547)
  include a clause to change a data-attr on the fly
  Update tests
  Restore specs
  set different modals foreach comment
  unify report button for futher uses
  use report_button instead of flag_modal
  Unify comments:loaded event
  Remove pending
  Skip unless redesign enabled
  Remove turbo reference
  Remove unused method
  Remove unused components
  Disabled examples when redesign is disabled
  Fix edit comment after comment edited
  use label component
  clean duplicated class
  ...
entantoencuanto added a commit that referenced this pull request Mar 29, 2023
…ature/redesign-staging

* feature/redesign-process-groups-content-blocks:
  Remove deprecated content block
  Replace processes content block in process groups homepage with redesigned one
  Redesign: author tooltip (#10438)
  Redesign: pending things of the public profile (#10472)
entantoencuanto added a commit that referenced this pull request Apr 10, 2023
* feature/redesign:
  Redesign: menu mobile (#10351)
  Fix comments scss to avoid compilation errors (#10657)
  Redesign: Add a new <aside> to layout item (#10620)
  Redesign: author tooltip (#10438)
  Redesign: pending things of the public profile (#10472)
entantoencuanto added a commit that referenced this pull request Apr 10, 2023
* feature/redesign:
  Redesign: menu mobile (#10351)
  Fix comments scss to avoid compilation errors (#10657)
  Redesign: Add a new <aside> to layout item (#10620)
  Redesign: author tooltip (#10438)
  Redesign: pending things of the public profile (#10472)
  Redesign: card L link whole card (#10554)
  strip links from cards, standarize author cell (#10547)
entantoencuanto added a commit that referenced this pull request Apr 13, 2023
* feature/redesign:
  replace uses of specific margin-bottom for layout margins (#10675)
  Redesign: menu mobile (#10351)
  Fix comments scss to avoid compilation errors (#10657)
  Redesign: Add a new <aside> to layout item (#10620)
  Redesign: author tooltip (#10438)
  Redesign: pending things of the public profile (#10472)
  Redesign: card L link whole card (#10554)
  strip links from cards, standarize author cell (#10547)
entantoencuanto added a commit that referenced this pull request Apr 28, 2023
…ent-blocks

* feature/redesign: (196 commits)
  Redesign: process & process group cards (#10716)
  Redesign: conference cards (#10502)
  Redesign: pending blogs (#10686)
  Redesign: blog cards (#10685)
  Redesign: filters (#10390)
  replace uses of specific margin-bottom for layout margins (#10675)
  Redesign: menu mobile (#10351)
  Fix comments scss to avoid compilation errors (#10657)
  Redesign: Add a new <aside> to layout item (#10620)
  Redesign: author tooltip (#10438)
  Redesign: pending things of the public profile (#10472)
  Redesign: card L link whole card (#10554)
  strip links from cards, standarize author cell (#10547)
  include a clause to change a data-attr on the fly
  Update tests
  Restore specs
  set different modals foreach comment
  unify report button for futher uses
  use report_button instead of flag_modal
  Unify comments:loaded event
  ...
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.

6 participants