boukestam / inbox-in-gmail

Web extension that adds features of Google Inbox to Gmail
MIT License
123 stars 21 forks source link

Date grouping not working correctly #59

Closed djcurfew closed 5 years ago

djcurfew commented 5 years ago

The date grouping has never worked for me. I have the correct recommended settings:

  1. "default" set for the inbox
  2. no grouping enabled
  3. no other extensions

I am willing to pay to get this fixed, if you'd like to do a Google Hangout to inspect the issues I would be happy to compensate for time. As I would love to get this working!

Thank you!

Examples: image image image

russelldc commented 5 years ago

@djcurfew This is because the snoozed emails are messing with the ordering. This is a duplicate of: Issue #48 - Date bundling snoozed emails

djcurfew commented 5 years ago

Ah got it. Any chance this would be fixed soon? I will send $250 for a bounty for this if you can fix this week :)

russelldc commented 5 years ago

That sure is motivating! I'll let you know later tonight if I'll take up that offer.

abasiri commented 5 years ago

@djcurfew I've tried fixing that issue in the past, unfortunately the DOM itself doesn't have any information about when the snoozed email came back into the inbox, it only has information about when the email was originally received which is what breaks the date titles.

Two potential solutions I've messed with are: 1) Trying to artificially group with with another date title, the problem with this is that it's hard to pick which group, the one preceding it or the one after it. If you pick the wrong one, it can get confusing. 2) Try to get access to the in memory emails that the browser is managing and look up additional information about it. Unfortunately I didn't make it far with this option, everything is held in binary form, and I couldn't parse out the right info.

russelldc commented 5 years ago

I guess the question is, what would you want to see/what did Inbox do in this situation @djcurfew ?

If a snoozed email from February returned today, should it be grouped under Today, or under February?

abasiri commented 5 years ago

It should be grouped under Today. That's the hard part.

Since this only happens to snoozed emails at the boundary of date groups, one thing I do is either resnooze those if I still need them, or dismiss them if i'm done with them.

I'll keep searching for a solution, but nothing yet has come up.

abasiri commented 5 years ago

@djcurfew I came up with a hack that I think you will like:

If the snoozed email is the first email, i just label it as if it arrived today. All other snoozed emails join the most recent sibling. This way it's less likely to miss a snoozed email, with a small annoyance that if a snoozed email was the last email that arrived on a day, say 'Yesterday', it will look like it's the first email that arrived the next day.

djcurfew commented 5 years ago

@abasiri Awesome! Could you send me the zip so I can test it out?

djcurfew commented 5 years ago

Also, I'm assuming you guys are aware of this library? https://www.inboxsdk.com/ Helps a lot with getting that kind of data

russelldc commented 5 years ago

@djcurfew I definitely was not aware of that library! That seems like it could be very useful for this whole project. I wonder if some refactoring of the entire extension is in our future...

Although... it's not so much just a library, as it is a service. I'm not so sure I like that.

https://www.inboxsdk.com/register

AppIds are required to run any application built for the InboxSDK in production. Without a valid AppId, your application will show a warning banner at the top of Gmail. You can use this page to create as many AppIds as you need. Note that your AppId is tied to your Google account.

russelldc commented 5 years ago

@djcurfew If you still need that zip, just go to @abasiri 's branch from the PR, and click download as zip. Or I'll just save you time: https://github.com/abasiri/inbox-in-gmail/archive/ali/hack-for-snoozed-email-issue.zip

russelldc commented 5 years ago

Rather than InboxSDK, something more like this could be useful:

https://github.com/KartikTalwar/gmail.js

This one's actually just a local library, and it is updated frequently (last commit in master was yesterday).

It has some of the same useful features, like creating an observer for certain events.

abasiri commented 5 years ago

These libraries look interesting. I'll keep them in mind next time I'm in code.

djcurfew commented 5 years ago

Woohoo! this works great! @abasiri I assume the bounty goes to you? Let me know your paypal please! Thanks sooooo much!

abasiri commented 5 years ago

@djcurfew I'm glad to hear it's working out for you. Also thanks so much for the bounty, I'd like to split it with @russelldc. His help has been crucial for me. Email is: abassiri at gmail

djcurfew commented 5 years ago

Oh no, it seems to break again after using it, any idea what's going on here? image

When I refresh, same problem.

abasiri commented 5 years ago

Can you share the full image with time stamps?

russelldc commented 5 years ago

@abasiri Wasn't my "help" after you'd already done the work and made the PR? :P

@djcurfew Oh no, could you post a screenshot showing the full width, so we can see which ones are snoozed for easier diagnostics? Blur out the email content if that's why you'd snipped it short.

abasiri commented 5 years ago

@djcurfew I have a repro, and it seems it's a gmail issue, the emails are out of order even without the extension. Looking at this screenshot, you'll notice one email from yesterday appear in between two emails from today. Not sure if this is a feature we'll need to turn off in gmail, @russelldc any ideas?

image

russelldc commented 5 years ago

@abasiri Interesting... so that April 29th email in the middle was snoozed before, or no?

abasiri commented 5 years ago

No, it wasn't snoozed.

russelldc commented 5 years ago

@abasiri And is it staying there when you refresh?

abasiri commented 5 years ago

@russelldc yes. That is the 'stable' view of gmail without the extension. Inbox used to do something similar when it thought an email was important and I had forgotten about it, it would bring it forward again, but it would indicate that was the case.

russelldc commented 5 years ago

@abasiri So it's not tagged with the yellow important marker, then?

If it is marked, then is the 8:34AM email not marked as important?

russelldc commented 5 years ago

@abasiri It seems like the feature you were talking about, quoted below, is the Nudges feature.

Inbox used to do something similar when it thought an email was important and I had forgotten about it, it would bring it forward again

@djcurfew Is Nudges turned on? Check Settings -> General -> Nudges

Also, what "Inbox type" (Default, Important first, etc.) are each of you using?

If it's not either of those things affecting it, it sounds like it's just a Gmail glitch :/

abasiri commented 5 years ago

That's it, it must be the Nudges, It's turned on in mine. A work around would be to turn off nudges.

russelldc commented 5 years ago

@abasiri Could you try turning it off and see if that actually "fixes" it?

abasiri commented 5 years ago

It's unlikely to fix the current emails, it should just prevent future emails from going out of order.

djcurfew commented 5 years ago

I have "default" inbox and it also isn't nudges. I think this has something to do with throughout my day, after snoozing and working with certain emails. When I start the day, it works fine. Let me try and get some pattern recognition going here so I can figure out what the issue is. I'll try to get repro steps and let you know.

@abasiri bounty sent via paypal! @russelldc let me know your paypal as well

Thanks so much for your help guys!

abasiri commented 5 years ago

@djcurfew Thanks for the bounty!

I figured out the issue: When you click on a snoozed email, and then come back to inbox, it no longer has the yellow tag information about the snoozing, just the original date. I use the yellow tag to identify snoozed emails. A fix would be to identify out of place emails and treat them the same as I do with snoozes. Any fix would have to consider that there could be multiple out of place emails next to each other, so it could get a bit more complicated. I'm a bit under the weather right now, I'll tackle this in the next day or so.

russelldc commented 5 years ago

@djcurfew russelldc at outlook

Thanks! 😊

djcurfew commented 5 years ago

@russelldc sent!

@abasiri Awesome, you're the best!

russelldc commented 5 years ago

@djcurfew Thanks again! I think @abasiri added some changes to further rectify the snooze date problems, in PR #68. I'm hoping we can get that PR complete and merged in the next 24-48 hours.

russelldc commented 5 years ago

@djcurfew I'll close this issue when you test those new changes, unless you think it's ready to close now.

djcurfew commented 5 years ago

I haven't had any issues, so clear to close! Thanks again!