OpenSource: [KLNotificationView] A simple notification view class for your web projects

Hi,

KLNotificationView is a simple to use and implement view that animates down from the top when the app needs to give feedback or notify the user of something. (See screenshot ) from the creators of the WebGrid table view for XOJO project.

KLNotificationView is free as in free speech, fully open source code. It’s not a difficult class to write, but it solves a basic problem that its often found on WebApps and this class presents a solution where all of us (who care and want) can contribute to have a more powerful class. Notification panels, dialogs or views are so useful and required in almost every app, that most of us have written our own helper class. Creating dialogs, most of the time is an overkill for simple user notifications. I wrote this because I got tired of writing dialogs for every message that needs to be none intrusive for the user or the app process.

USAGE
See GitHub readme or class notes for details
With this class, you simply drag the folder from the sample project to your project, add the class to your WebPage or WebContainer, and call the .show method of the class with the parameters that setup how you want the view.

Please feel free to add your comments here, and/or contribute to the code by forking the repository and including your poetry to improve the original code or extend it.

I hope that you enjoy using it as much as I did writing it!

Repository URL (GET CODE):
https://github.com/kikolobo/KLNotificationView

Screenshot:

NOTE: This is my first shot at an open source project for XOJO using GitHub, so pardon me if things are not as perfect as they should in regards to the repository setup. So bare with me :wink:

The screenshot doesn’t show…

Try this URL if you are still having issues seeing the screenshot. Also see github page for more details and screenshot.
http://s11.postimg.org/yppurjb4z/KLNotification_View_SS.png

I updated the screenshot in gitHub. Let me know if there are any other issues

Great job!

When using a SCM system with Xojo, I’d use a text based format, Xojo Project, or at least Xojo XML. It allows the SCM to manage diff/merges/etc… With the .xojo_binary, it will be impossible to do merges. For example, I could checkout the project, make a bug fix and send you a pull request through GitHub. With the binary, you wouldn’t be able to see what I fixed and if you just trusted me and accepted the pull, the only thing Git could do is overwrite the binary, it can’t merge it.

If, on the other hand, you commit the code as a text format, when you get a pull request, you will be able to see exactly what was changed and merge the request right in with your working project no problems. You also gain the ability to see what changed from commit to commit, which I find very valuable for tracking down bugs, especially regressions. Just food for thought.

Thank you very much for sharing the project!

Hey Jeremy, you are totally right!!! I will update the project in a bit…

Thank you for the comment. Let me know any other suggestions!!

The Git repository is now updated with text based project format. Jeremy could you take a look if that will do?

Thanks!

That looks great! One change, though, the .xojo_uistate file shouldn’t be in the repo as it is for the given user. Each users .xojo_uistate file will change as they change the windows location, what item they were last on, etc… It does not include code pertenient to the actual project.

For the fun of it I made the change, removing the file in question and adding it to the .gitignore file, and sent you a pull request. You probably got an email. All you have to do now is on github, look at the pull requests and click the merge button if you like what you see. If you don’t like what you can see, say a bad bug fix, or a feature addition you don’t approve of, etc…, you could comment on a pull request and decline it. GitHub is pretty cool that way, makes it ultra simple for people to share bug fixes with each other.

Merge complete! Thanks for the help Jeremy!

No problem, I’m excited for more people in the Xojo community to move to Git/GitHub for OS projects, it really is a slick way to go. Thanks for KLNotificationView!

Coming up KLActiveRecord and KLTableView :wink:

Anyone using this on her/his project? Would love to hear about your experience.

Not yet! But will on my next project in a month or so :slight_smile:

It’s in my “when the need arises” file.

Thank you for sharing :slight_smile: Will keep this handy.