Skip to content
This repository was archived by the owner on Mar 29, 2021. It is now read-only.

Idrinth#71

Merged
w20k merged 15 commits intomasterfrom
idrinth
Jul 22, 2016
Merged

Idrinth#71
w20k merged 15 commits intomasterfrom
idrinth

Conversation

@Idrinth
Copy link
Copy Markdown
Member

@Idrinth Idrinth commented Jul 21, 2016

Fixes #17 provide framework and basic styling
Fixes #1 fixing possible bug

Comment thread stable.js Outdated
},
controls: null,
tooltipTO: null,
buildModal:function(title,content,altFunc) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't handle cases when, for some reasons, content is wrong type. Could you add a type check handle for the function to proceed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is, that I'd need to typecheck both content itself as well as any children it might have.
content can be used as a string or the usual configuration-object, throwing anything else out, that doesn't see to fit is imo the best in that case.
I fear checking the whole content-tree might just be a bit too much overhead.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A simple example: buildModal(null, null, null) -> buildModal(undefined, undefined, undefined). Because API expose these as a public method in both scenarios popup should draw close sign, and have empty body and empty title.

@w20k
Copy link
Copy Markdown
Collaborator

w20k commented Jul 21, 2016

We really need to deal with spaces somehow. I use Idea Jetbrains and our spacing policy is totally different :) I really don't think that one space before and after a function name/call is a good idea to use in JS, it's my humble opinion.

Would be good idea to reduce usage of parseInt function.

@Idrinth
Copy link
Copy Markdown
Member Author

Idrinth commented Jul 22, 2016

Regarding spaces: I consider sourcecode with some spaces more readable, but I agree that the finally delivered code needs to be as small as possible.
The later is handled by the minifier, so I don't see a reason to save space in the codebase.

@Idrinth
Copy link
Copy Markdown
Member Author

Idrinth commented Jul 22, 2016

added an else-case if they didn't match the required format and an output that should be sufficiently obvious so the caller understands what is missing.

@w20k
Copy link
Copy Markdown
Collaborator

w20k commented Jul 22, 2016

Sorry, missed that part. Looks very nice ;) Merging.

@w20k
Copy link
Copy Markdown
Collaborator

w20k commented Jul 22, 2016

Could you update your branch with master?

@Idrinth
Copy link
Copy Markdown
Member Author

Idrinth commented Jul 22, 2016

sorry, forgot to push :D

@w20k w20k merged commit ecfb1ce into master Jul 22, 2016
@w20k
Copy link
Copy Markdown
Collaborator

w20k commented Jul 22, 2016

legit 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace window.alert and window.confirm Chat-invitations

2 participants