Skip to:
Content

BuddyPress.org

#8031 closed defect (bug) (fixed)

Messages - Alert icon is shown twice which is not intuitive.

Reported by: pooja1210 Owned by: boonebgorges
Milestone: 5.0.0 Priority: normal
Severity: normal Version: 3.0.0
Component: Messages Keywords:
Cc:

Description

Steps to Reproduce:

  1. Go to the messages tab.
  2. Click on compose.
  3. Don't enter the username, just enter subject and message.
  4. And click on the send button.
  5. Observe the error message shown, the error message shows alert icon twice which is not intuitive.

The icon should be shown only once.

Checked with BuddyPress 4.1.0 ( also found that 3.2.0 ) had the same issue.

Attachments (4)

alert-message.png (68.0 KB) - added by pooja1210 22 months ago.
8031.diff (788 bytes) - added by boonebgorges 22 months ago.
Screenshot_2019-01-10_20-40-50.png (16.6 KB) - added by boonebgorges 22 months ago.
8031.2.diff (693 bytes) - added by imath 22 months ago.

Download all attachments as: .zip

Change History (10)

#1 in reply to: ↑ description @pooja1210
22 months ago

Replying to pooja1210:

Steps to Reproduce:

  1. Go to the messages tab.
  2. Click on compose.
  3. Don't enter the username, just enter subject and message.
  4. And click on the send button.
  5. An error message is shown if the username is not entered while composing the message.
  6. Observe the error message shown, the error message shows alert icon twice which is not intuitive.

The icon should be shown only once.

Checked with BuddyPress 4.1.0 ( also found that 3.2.0 ) had the same issue.

#2 @boonebgorges
22 months ago

Hi @pooja1210 - Thanks for the report!

@imath - Quick question for you when you have a moment. This is happening because displayFeedback() is being given a string containing multiple bp-feedback divs. In an ideal world, I'd think that you should be able to pass multiple (separate) messages to displayFeedback, and it'd then build *separate* bp-feedback items. But this might be hard to make work (it'd complicate the process of clearing feedback, for example). So maybe we could just modify the value passed to displayFeedback in this case so that it's a ul of errors instead? See screenshot and patch. Obviously, we'd clean up the spacing :)

@boonebgorges
22 months ago

#3 @boonebgorges
22 months ago

I just realized that 8031.diff uses the wrong HTML tags, but it gives you the idea :-D

#4 @imath
22 months ago

Hi @boonebgorges

Sorry it took me some time to give you the quick reply. Looking at the code I was a bit surprised to see this amount of html tags. I thought I lost my mind when I wrote this line ! So I've searched & found the origin of it to understand what happened and to feel better about myself :)

Now about using a list. I'd say why not. But I think I'd probably put it back the way it was when I've built it in the first place, because this part is using a JS Template that is doing <p>{{{data.message}}}</p>. So if there's only one message I can imagine some users might report why are you using a list inside a paragraph for only one element ?

About improving it so that there are multiple distinct feedbacks, you're right about the fact it would complexify a bit for the reasons you mentioned (clearing etc).

But if you think it's a better approach, we can take the time to use multiple distinct feedbacks ;)

PS: 8031.2.diff is "the way it was when I've built it in the first place" :)

@imath
22 months ago

#5 @boonebgorges
22 months ago

  • Component changed from Core to Messages
  • Milestone changed from Awaiting Review to 5.0.0
  • Version changed from 4.1.0 to 3.0.0

Thank you for looking, @imath ! Your solution seems good to me :-D

#6 @boonebgorges
22 months ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 12325:

Nouveau: Prevent nested error notices in the Messages Compose screen.

Props imath.
Fixes #8031.

Note: See TracTickets for help on using tickets.