Redesign: author tooltip#10438
Conversation
ferblape
left a comment
There was a problem hiding this comment.
Codewise looks ok, but there are many broken tests. I'll ask @entantoencuanto to fix them
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 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.mp4Currently, 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.mp4So, 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? |
|
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 |
|
@Crashillo working great now, thanks! |
|
@Crashillo could you review the merge conflict? |
|
@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) ...
|
ping @decidim/maintainers, could you please review this? |
alecslupu
left a comment
There was a problem hiding this comment.
One single question, that does not block the PR.
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 |
…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 ...
* 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)
* 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)
…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 ...

🎩 What? Why?
Refactor the way the user tooltip is working: from now on it acts like a popover, it's appended to the
bodytag 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: