Opened 6 years ago
Closed 6 years ago
#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:
- Go to the messages tab.
- Click on compose.
- Don't enter the username, just enter subject and message.
- And click on the send button.
- 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)
Change History (10)
#1
in reply to:
↑ description
@
6 years ago
#2
@
6 years 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 :)
#4
@
6 years 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" :)
Replying to pooja1210: