Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display a flash message on removal of a step #345

Closed
Mridul97 opened this issue Sep 28, 2018 · 8 comments
Closed

Display a flash message on removal of a step #345

Mridul97 opened this issue Sep 28, 2018 · 8 comments
Labels
coding Issue related to code gci-candidate Issue being considered for gci medium

Comments

@Mridul97
Copy link

Mridul97 commented Sep 28, 2018

We are preparing to participate in Google Code-in, and have reserved this issue for participants in GCI - but we'd love to have your help with another one! Please check out https://code.publiclab.org to see more.

First Timers Only

Hi, this is a first-timers-only issue. This means this has been worked to make it more legible to folks who either haven't contributed to our codebase before, or even folks who haven't contributed to open source before.

If you have contributed before, consider leaving this one for someone new, and looking through our general help wanted issues. Thanks!

The Problem

We want to display a flash message like 'Step Removed' whenever user removes a step.

ss_8

The Solution

Ideally we would like that the message should fade in whenever a step gets removed and fade out after a short time like 1 second. So that it makes the website more interactive and also doesn't disturb the flow of the website.

A function to display the message can be triggered on click of remove button.

Remove button is made here:

var tools =
'<div class="tools btn-group">\
<button confirm="Are you sure?" class="remove btn btn btn-default">\
<i class="fa fa-trash"></i>\
</button>\
</div>';

The function should fade in the display message and fade it out after 1 second.

@gitmate
Copy link

gitmate bot commented Sep 28, 2018

GitMate.io thinks the contributor most likely able to help you is @tech4GT.

Possibly related issues are #338 (Display an installation message to user in the CLI), and #49 (image degredation over repeated steps (invert)).

1 similar comment
@gitmate
Copy link

gitmate bot commented Sep 28, 2018

GitMate.io thinks the contributor most likely able to help you is @tech4GT.

Possibly related issues are #338 (Display an installation message to user in the CLI), and #49 (image degredation over repeated steps (invert)).

@tech4GT
Copy link
Member

tech4GT commented Sep 28, 2018

Good one, @Mridul97 Let's make this one a medium gci issue, Thanks!

@tech4GT tech4GT added gci-candidate Issue being considered for gci coding Issue related to code medium and removed help wanted labels Sep 28, 2018
@jywarren
Copy link
Member

Hi, great! Is there a simple "flash notification" library you'd recommend for someone, or example code of what a notification could look like? Bootstrap has an "alert" component you could use; you could try linking to that -- https://getbootstrap.com/docs/3.3/

@adisapphire
Copy link
Member

please review

@Mridul97
Copy link
Author

Mridul97 commented Sep 29, 2018

Actually bootstrap alert doesn't disappear itself so we will have to make it disappear using js, I think we can either use bootstrap alert or create a customized alert by just using a
<p>Step Removed</p>
tag and add styling using css. And then we can set it to fade in and fade out using js
$(selector for remove button).click(showFlashMessage)
showFlashMessage would be the function that will fade in and fade out the message after 1 second.

@jywarren
Copy link
Member

jywarren commented Sep 29, 2018 via email

@SidharthBansal
Copy link
Member

This task is published on GCI dashboard. Thanks all.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coding Issue related to code gci-candidate Issue being considered for gci medium
Projects
None yet
Development

No branches or pull requests

5 participants