create account

Display 'Delete Selected' in Drafts Conditionally by lifecruiser

View this thread on: hive.blogpeakd.comecency.com
· @lifecruiser · (edited)
$13.61
Display 'Delete Selected' in Drafts Conditionally
![busy-logo.PNG](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262215/iri51hfransmbovirncx.png)

#### Expected behavior
In the busy.org drafts page, the users are shown their saved drafts. There is a button 'Deleted Selected' which will delete the select drafts or we can select all drafts and delete them at once. If none of the drafts are selected then this should be disabled, users should not be allowed to click on it.

Delete option is available for each individual drafts too, which is working fine but not the 'Delete selected' button placed above the drafts list.

#### Actual behavior
The 'Delete selected' button is always visible even when none of the drafts are selected. The link is active hence the users can click on it, then it shows a confirmation pop up for deletion. Logically it is incorrect because the users have not selected any drafts but yet the deletion confirmation shows up when we click on 'Delete Selected', after confirming nothing happens. 

Basically, the 'Delete Selected' should work only when the user has selected atleast one draft from the list. 

#### How to reproduce
1. Go to https://busy.org
2. After logging in, navigate to drafts page through the header menu 'three dots menu' and select 'Drafts'
3. Alternatively, once logged in we can navigate to https://busy.org/drafts
4. If any drafts are available, 'Delete selected' will appear above the drafts list.
5. Click on it & it would show confirmation popup (and that is the bug!)

* Browser: *Chrome*
* Operating system: *Windows 7*

#### Recording Of The Bug
Recording of the bug and steps to reproduce is available below. 

![busy_drafts_800.gif](https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262222/wsxjmgwxnzkrl5uamzla.gif)


<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@lifecruiser/display-delete-selected-in-drafts-conditionally">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 63 others
properties (23)
authorlifecruiser
permlinkdisplay-delete-selected-in-drafts-conditionally
categoryutopian-io
json_metadata{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":64382195,"name":"busy","full_name":"busyorg/busy","html_url":"https://github.com/busyorg/busy","fork":false,"owner":{"login":"busyorg"}},"pullRequests":[],"platform":"github","type":"bug-hunting","tags":["utopian-io","busy","drafts","indiaunited","india"],"links":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262215/iri51hfransmbovirncx.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262222/wsxjmgwxnzkrl5uamzla.gif"],"image":["https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262215/iri51hfransmbovirncx.png","https://res.cloudinary.com/hpiynhbhq/image/upload/v1519262222/wsxjmgwxnzkrl5uamzla.gif"],"moderator":{"account":"eastmael","time":"2018-02-25T10:23:03.981Z","reviewed":true,"pending":false,"flagged":false},"questions":null,"score":null}
created2018-02-22 01:18:12
last_update2018-02-25 10:41:03
depth0
children9
last_payout2018-03-01 01:18:12
cashout_time1969-12-31 23:59:59
total_payout_value9.864 HBD
curator_payout_value3.750 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,932
author_reputation4,559,162,193,343
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id39,479,377
net_rshares3,049,091,313,694
author_curate_reward""
vote details (127)
@c0ff33a ·
I know many people use busy.org but I have yet to try it - in your opinion is this a good alternative to Steemit? What are the major benefits?
[![c0ff33commentaimage.png](https://steemitimages.com/DQmPfQAJ6t12Yvpf2CcMUNWXwZSr7UpNhjZVjR14PJggrL9/c0ff33commentaimage.png)](https://steemit.com/@c0ff33a)
#thealliance
👍  
properties (23)
authorc0ff33a
permlinkre-lifecruiser-display-delete-selected-in-drafts-conditionally-20180225t030919348z
categoryutopian-io
json_metadata{"tags":["utopian-io","thealliance"],"image":["https://steemitimages.com/DQmPfQAJ6t12Yvpf2CcMUNWXwZSr7UpNhjZVjR14PJggrL9/c0ff33commentaimage.png"],"links":["https://steemit.com/@c0ff33a"],"app":"steemit/0.1"}
created2018-02-25 03:09:18
last_update2018-02-25 03:09:18
depth1
children2
last_payout2018-03-04 03:09:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length313
author_reputation472,874,864,646,656
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,236,304
net_rshares2,691,777,114
author_curate_reward""
vote details (1)
@lifecruiser ·
busy.org is good in terms of UI. It has a recommendation feature which will suggest whom to follow and what to read etc. Recently, notifications is also added, which will let you know when someone follow you or when you are mentioned in any post etc.
👍  
properties (23)
authorlifecruiser
permlinkre-c0ff33a-re-lifecruiser-display-delete-selected-in-drafts-conditionally-20180225t055921827z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"busy","app":"busy/2.3.0"}
created2018-02-25 05:59:30
last_update2018-02-25 05:59:30
depth2
children1
last_payout2018-03-04 05:59:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length250
author_reputation4,559,162,193,343
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,261,957
net_rshares1,591,756,257
author_curate_reward""
vote details (1)
@growingpower ·
Hi! Thanks for your support, @growingpower just upvoted your comment ;) Hope you have a great day
👍  
properties (23)
authorgrowingpower
permlinkre-lifecruiser-re-c0ff33a-re-lifecruiser-display-delete-selected-in-drafts-conditionally-20180225t055937214z
categoryutopian-io
json_metadata{"app":"steembot/0.7.0"}
created2018-02-25 05:59:36
last_update2018-02-25 05:59:36
depth3
children0
last_payout2018-03-04 05:59:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length97
author_reputation-9,372,785,368
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,261,964
net_rshares0
author_curate_reward""
vote details (1)
@eastmael ·
$1.05
Thank you for the contribution. It has been approved.

*I was having second thoughts whether this would fall under suggestion, but decided that it can be considered a bug since it should just display 'Are you sure you want to permanently delete..?' when there's something selected.*

You can contact us on [Discord](https://discord.gg/uTyJkNm).
**[[utopian-moderator]](https://utopian.io/moderators)**
👍  
properties (23)
authoreastmael
permlinkre-lifecruiser-display-delete-selected-in-drafts-conditionally-20180225t102515555z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-25 10:25:12
last_update2018-02-25 10:25:12
depth1
children2
last_payout2018-03-04 10:25:12
cashout_time1969-12-31 23:59:59
total_payout_value0.790 HBD
curator_payout_value0.263 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length401
author_reputation78,967,407,130,763
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,304,240
net_rshares191,326,959,276
author_curate_reward""
vote details (1)
@lifecruiser ·
Thanks, the bug here is - it shows a confirmation message even though none of them were selected.
properties (22)
authorlifecruiser
permlinkre-eastmael-re-lifecruiser-display-delete-selected-in-drafts-conditionally-20180225t162526315z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-25 16:25:27
last_update2018-02-25 16:25:27
depth2
children0
last_payout2018-03-04 16:25:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length97
author_reputation4,559,162,193,343
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,371,723
net_rshares0
@utopian.tip ·
$0.11
Hey @eastmael, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
👍  
properties (23)
authorutopian.tip
permlinkre-re-lifecruiser-display-delete-selected-in-drafts-conditionally-20180225t102515555z-20180226t004156
categoryutopian-io
json_metadata""
created2018-02-26 00:41:57
last_update2018-02-26 00:41:57
depth2
children0
last_payout2018-03-05 00:41:57
cashout_time1969-12-31 23:59:59
total_payout_value0.110 HBD
curator_payout_value0.003 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length158
author_reputation238,310,597,885
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,457,805
net_rshares20,875,502,717
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @lifecruiser! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/commented.png)](http://steemitboard.com/@lifecruiser) Award for the number of comments received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click [here](https://steemit.com/@steemitboard)

If you no longer want to receive notifications, reply to this comment with the word `STOP`

> Upvote this notification to help all Steemit users. Learn why [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-lifecruiser-20180225t090102000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notifications.png"]}
created2018-02-25 09:01:00
last_update2018-02-25 09:01:00
depth1
children0
last_payout2018-03-04 09:01:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length695
author_reputation38,975,615,169,260
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,290,526
net_rshares0
@utopian-io ·
### Hey @lifecruiser I am @utopian-io. I have just upvoted you!
#### Achievements
- Seems like you contribute quite often. AMAZING!
#### Suggestions
- Contribute more often to get higher and higher rewards. I wish to see you often!
- Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!
#### Get Noticed!
- Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
properties (22)
authorutopian-io
permlinkre-lifecruiser-display-delete-selected-in-drafts-conditionally-20180226t150207713z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-02-26 15:02:12
last_update2018-02-26 15:02:12
depth1
children0
last_payout2018-03-05 15:02:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,431
author_reputation152,955,367,999,756
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id40,621,933
net_rshares0
@yadhnesh ·
Thanks for sharing your knowledge. Your article will benefit for new steemitian.
👍  
properties (23)
authoryadhnesh
permlinkre-lifecruiser-display-delete-selected-in-drafts-conditionally-20180222t024739365z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-02-22 02:47:27
last_update2018-02-22 02:47:27
depth1
children0
last_payout2018-03-01 02:47:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length80
author_reputation1,151,306,181,792
root_title"Display 'Delete Selected' in Drafts Conditionally"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id39,495,295
net_rshares1,376,476,933
author_curate_reward""
vote details (1)