-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add icon indicator when sticky note content is saved #77
Comments
What file is this in? I think I can fix it but I cant find it. |
@GrantBaum this is where the component is for the sticky note homepage module. All code for the homepage modules are found under https://github.com/MyMICDS/MyMICDS-v2-Angular/tree/master/src/app/home/modules/stickynotes |
When the TS file says subscription, is that what is saving the sticky? |
Yes, refer to the |
Just to give a bit more guidance, how I would approach this problem is create a new variable within the class that’s called like |
what if I just use window.alert(JSON.stringify(anyobject)); |
and an alert pops up that will say success |
While it does give users confirmation that the note is saved, I don’t think that would be a good user experience because an alert is pretty intrusive and you have to click “okay.” I think an icon with absolute positioning so it is in the corner of the sticky note may be more subtle and appropriate, or maybe something else. |
so like it has like the cloud downloading when the boolean saving is true, and when saved is true there is like a check? Would I have to do any SCSS for that? also, how do I make the boolean change by itself? (sorry im asking a lot) |
It's all good! Yes, that's a good idea. It seems that we already have Font Awesome installed so we can make take advantage of this package. Positioning the icon would require CSS, and you can put that in the Likely you can create a CSS class for this status icon, and give it We would have to change this |
So I would just put var saving = true, and write the css to put an image in the corner. Is the backend call what changes the image too? If not, how fo I associate the true/false with what image is there? And do I have to put the image in the code? Sorry you are basically doing this for me lol |
Angular provides a very easy way to show something conditionally (based on a true/false value) When the subscription returns with success, that's the backend telling angular that the data has been saved. Knowing that, we can use And don't worry, my first contribution was basically the same way. |
That way user doesn't quit before their important information is saved
The text was updated successfully, but these errors were encountered: