Hi IceCreamYou, maybe it's a silly question, but how does one clear their status. If I empty the text input and click Save, it does not clear the value. And there is no 'Clear' button...

Thanks much.

CommentFileSizeAuthor
#8 facebook_status_clear_status.patch859 bytesalex.k

Comments

icecreamyou’s picture

Title: How do we clear status? » Clear Status Button
Assigned: Unassigned » icecreamyou
Category: bug » feature

It is not possible to clear statuses at this time, although last I checked the validation was broken so it actually was possible to save a blank status. I can add a button to clear the status if requested, but it won't happen until after December 19th at the earliest.

alex.k’s picture

Thanks, a button would be great. Is it an additional submit handler for the same form, or something more complicated?

icecreamyou’s picture

I haven't decided. I was originally thinking I would do it with a button instead of a submit so only the validation would be run, but I don't think that would change the slider text, so I'll have to think about this some more. Ideally I'd like to move the slider text inside the form itself, but that probably won't happen because some people need the form separately. The only way it would happen is if I added a parameter to the function to include/exclude the sliding stuff. In that case, a button would work.

Otherwise, yes, the probable option is an extra submit function.

icecreamyou’s picture

Having considered this more and been inspired by delete/confirm pages, I've changed my mind about the implementation. It's going to be a simple link that goes to a page that will handle the clearing and then redirect back to wherever the user was before.

As far as how the actual clearing will work - I think a completely blank status will need to be saved into the database. As regrettable as that is, the only alternative is deleting all the statuses for the user in question. There is a problem of what time to save. Does anyone have an opinion on whether the time saved should be null or the time the message was cleared? Null is more complicated because then whenever the time is displayed (either in the module or in developer code) there will need to be a check to see if the time even exists; and as it is, there will already need to be a check in the code that produces lists of users to make sure the status exists.

icecreamyou’s picture

Status: Active » Fixed

On my local copy, I've removed the validation that kept users from saving a blank status, and arranged so that newly blank statuses do not show up in lists. I'm not going to add a clear link just because it would be the same as manually clearing the status.

Hopefully I'll get a new dev release out later this week.

alex.k’s picture

Sounds good - looking forward to trying it out! Thanks for checking into this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

alex.k’s picture

Status: Closed (fixed) » Needs review
StatusFileSize
new859 bytes

Thanks much for all recent development work on this module. It's looking really good :)

One issue with clearing statuses. After saving a blank status it is shown as "{user name} a moment ago" which does not make much sense. It's much better to say simply that this user doesn't have a status. Please look over attached patch, which checks that the status string is not empty, and uses the empty text if it is. I also removed "yet" from empty placeholders, because they can now appear in both cases.

Thanks!

icecreamyou’s picture

Status: Needs review » Fixed

Looks good. In the future you should use the -u command when creating a patch (I think) but I usually apply patches by hand anyway. Committed to dev.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.