Skip to content

Interface cleanup#114

Closed
dennisreimann wants to merge 20 commits into
KrauseFx:masterfrom
dennisreimann:develop
Closed

Interface cleanup#114
dennisreimann wants to merge 20 commits into
KrauseFx:masterfrom
dennisreimann:develop

Conversation

@dennisreimann

Copy link
Copy Markdown
Contributor

These are the changes I already talked to @KrauseFx about and want to propose to all of you so that we can talk about this interface cleanup.

Lots of breaking changes here, but I considered them necessary to support further development of TSMessages. It all started out with refactoring the initializers (0ae2927), which is also the biggest commit of this pull request. Another notable commit includes the naming changes (a614835) as well as dropping support for iOS 6 (cfb623d).

Feedback is welcome :)

This way one can directly call the `fadeMeOut` method on the actual view instead of having to call `[TSMessage dismissActiveNotification]` (which would be necessary if you want to dismiss the view programmatically in the callback, because you have disabled manual dismiss via `canBeDismissedByUser:NO`).

I find it better to deal with the actual instance of the view rather than relying on it being the currently active notification.

Right now it is only possible for it being the currently active notification, but these changes will make sense in conjunction with the next changes I'd like to propose in the next commits. ;)
Permanent notifications differ from normal ones in that permanent messages are not contained in the messages queue and can be displayed in addition to the other messages.

Permanent notifications do not get dismissed automatically, hence they do not have a duration but have to be dismissed by the user or programmatically in one of the callbacks.
The constructor for a permanent message also returns the instance of the message view, so that one can also capture it and dismiss it with other custom events.
This is so we can go forward and remove some of the incomplete edge case handling when calculating height and offset of the message view in `fadeInNotification:`, which depends on the statusbar and navigationbar being present or not.

The demo project now works for all cases and shows the buttons to toggle statusbar and navigationbar.
notification -> message
show -> display
fadeOut -> dismiss
@KrauseFx

Copy link
Copy Markdown
Owner

You Sir, are amazing! Thanks for the great contribution. I'm taking a look at those changes right now 👍

@KrauseFx

Copy link
Copy Markdown
Owner

Points I noticed:

  • Messages are not dismissible by tapping the message (by default). I think that's very important, since users tend to just ignore alerts/messages and try to get them out of their way
  • Shouldn't userDimissEnabled be default? It was until now and would require a lot of work to change that.
  • The Pull Request for Permanent messages is already in this one as well, right? (Permanent messages #112)
  • The button needs to be re-styled for iOS 7.

I guess it would also be fine to merge the following pull requests into the develop branch here:

I guess that would be a really nice 1.0 release:

  • iOS 7 only with improved iOS 7 style and UIKit Dynamics
  • Priorities for TSMessages
  • Text Alignment support
  • Easier setting up of TSMessages

@KrauseFx KrauseFx added this to the 1.0 milestone Feb 22, 2014
@dennisreimann

Copy link
Copy Markdown
Contributor Author

Messages are not dismissible by tapping the message (by default). [...]
Shouldn't userDimissEnabled be default?

Yes, I'll take care of this.

The Pull Request for Permanent messages is already in this one as well, right? (#112)

Yep.

@dennisreimann

Copy link
Copy Markdown
Contributor Author

I've added the latest two commits on develop so that we can progress from there. This pull request won't need merging as its commits will be merged into master when we reach 1.0 on the develop branch and merge it from there.

@dennisreimann

Copy link
Copy Markdown
Contributor Author

Hey @pengwynn, might this pull request be worth an Atom invite? :)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants