Giter VIP home page Giter VIP logo

Comments (10)

KartikTalwar avatar KartikTalwar commented on May 20, 2024

Hey @g8g3 this mostly makes sense but I'm a little confused with is_in_current_view. Would it be possible for you to describe what this property would/should do? As in, for both cases (convo turned on and off) what does that boolean check imply?

from gmail.js.

 avatar commented on May 20, 2024

Well I'm still thinking about something formal. I just stumbled upon that issue.

In my use case, the actions offered to a user are specific to what he can relate to.

If he sees a single email (with conversation mode off), even if it conceptually goes along with other emails, the user will interact with that email (like click buttons on it, input data, etc.). There is no way he can think of emails present in other views.

However, these "remote" emails (those that are not displayed) are actually processed by my extension and thus interfere with targeted data. This is why a clear indication of what the user can interact with is important.

So, to summarize, I'm talking about a property or a method that allows the developer to access specifically what is being displayed (as opposed to metadata, giving access to all related emails).

The thing is, we can't be based on visibility status as it's embedded in metadata and says, for example, that some non-displayed email has a visible_full status.

So I'll try to find another reliable indication of what's really shown to the user and what's not.

from gmail.js.

 avatar commented on May 20, 2024

I kind of discover conversation off mode.

Provided it necessarily displays only 1 email, I guess we can be based on the ID in the URL.
Hopefully that'll allow us to compare with all that's in parsed metadata and extract only what's displayed.

Edit
But anyway, you have to detect that you are not in conversation mode to perform that filtering.

from gmail.js.

KartikTalwar avatar KartikTalwar commented on May 20, 2024

@g8g3 yeah, this is really tricky. Not being able to resolve all those issues is kinda frustrating. I feel like the conversation mode setting will be in GLOBALS, otherwise it'll work for emails with just one item (which we can currently detect) and revert back to the case mentioned in the issues above..

from gmail.js.

 avatar commented on May 20, 2024

Hello @KartikTalwar,

I've been trying to find diff between the two modes, by using JSON.stringify() on globals and pasting the outputs into this.

Unfortunately, no diff for GLOBALS, neither for VIEW_DATA.

I'll keep trying parsing stuff, or think of a viable alternative.

One of them is parsing the DOM to find out how much email elements we have. Not so viable 👎.

from gmail.js.

 avatar commented on May 20, 2024

Note: if api.check.is_thread() is designed to know if an entire thread is displayed (as opposed to only one of its emails), then it returns false positives when metadata contain more than one email.

If it's really just to know whether "the whole thing" (whatever the display) is a thread, my mistake. (:

from gmail.js.

 avatar commented on May 20, 2024

I think I actually found a useful value: GLOBALS[17][5][1][57], which presents itself as:

  • ["bx_vmb", "0"] for conversation turned on ;
  • ["bx_vmb", "1"] for conversation turned off.

I guess I couldn't find it at first because you have to reload the page after tweaking settings, in order to get GLOBALS updated.

So, first, that has to be confirmed. Second, there's still the case when the user just switched the setting but GLOBALS has an obsolete value.

from gmail.js.

 avatar commented on May 20, 2024

The array with "bx_vmb" actually seems much more random to find.

You have to search for it in GLOBALS[17][5][1]. But it can also not exist, when convo is on.

Taken into account in #51.

from gmail.js.

KartikTalwar avatar KartikTalwar commented on May 20, 2024

I'm looking into this now.

from gmail.js.

josteink avatar josteink commented on May 20, 2024

This issue has had no activity for years. Assuming no longer a problem. Closing.

from gmail.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.