Skip to content
This repository was archived by the owner on May 22, 2020. It is now read-only.

Conversation

@MichaelMCoates
Copy link
Contributor

@MichaelMCoates MichaelMCoates commented Oct 2, 2019

Description of Change

This PR adds propagated events up to Application and System for BrowserView.

Tests:
https://testing-dashboard.openfin.co/#/app/sessions/api/completed/5da8b1ceee166d7a14d451bc

Corresponding js-adapter PR:
HadoukenIO/js-adapter#357

@aziz512 trying to add you as reviewer but it won't let me for some reason.

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • automated tests are changed or added
  • relevant documentation is changed or added
  • Link to new tests added
  • PR has assigned reviewers

Release Notes

Notes:

@MichaelMCoates MichaelMCoates changed the title [N/A] Hook up event propagation for all browserview-related events DO NOT REVIEW YET [N/A] Hook up event propagation for all browserview-related events Oct 2, 2019
@openfin-github-bot openfin-github-bot bot added the auto testing started Bot started automated testing label Oct 2, 2019
@openfin-github-bot
Copy link

c7afb49

Git

  • core: develop <= dev/coates/bv-event-propagation (c7afb49)
  • js-adapter: develop <= dev/coates/bv-event-propagation (eae221f)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 2, 2019
@openfin-github-bot
Copy link

⚠️ Failed to build c55acc4

@openfin-github-bot openfin-github-bot bot added auto testing failed Bot failed to build and removed auto testing done Bot completed automated testing labels Oct 10, 2019
@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing failed Bot failed to build labels Oct 10, 2019
@openfin-github-bot
Copy link

ab57f1c

Git

  • core: develop <= dev/coates/bv-event-propagation (ab57f1c)
  • js-adapter: develop <= dev/coates/bv-event-propagation (87dedcf)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 10, 2019
@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 10, 2019
@openfin-github-bot
Copy link

99ab0e7

Git

  • core: develop <= dev/coates/bv-event-propagation (99ab0e7)
  • js-adapter: develop <= dev/coates/bv-event-propagation (f231be5)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 10, 2019
@MichaelMCoates MichaelMCoates changed the title DO NOT REVIEW YET [N/A] Hook up event propagation for all browserview-related events [N/A] Hook up event propagation for all browserview-related events Oct 11, 2019
if (tokenizedRoute.length >= 2) {
const [channel, topic] = tokenizedRoute;
const uuid: string = (payload && payload.uuid) || tokenizedRoute[2] || '*';
const name: string|false = (payload && payload.name);
Copy link
Contributor

Choose a reason for hiding this comment

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

Mostly irrelevant nitpick: will eval to undefined if there's no payload or no name.
(!!payload && payload.name) will evaluate to false if there's no payload, but I think unidentified is probably actually what we want in this case anyhow.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Is there a case in which this could not work as expected?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think so. I would remove the |false typing, since this will never eval to false. But code looks good as is.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, right, good call, missed that. Changed.

@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 16, 2019
dhamberlin
dhamberlin previously approved these changes Oct 16, 2019
Copy link
Contributor

@dhamberlin dhamberlin left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@pbaize pbaize left a comment

Choose a reason for hiding this comment

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

If we restrict views to targets in the same app do we still need the custom window logic?

@openfin-github-bot
Copy link

27aee21

Git

  • core: develop <= dev/coates/bv-event-propagation (27aee21)
  • js-adapter: develop <= dev/coates/bv-event-propagation (f231be5)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 16, 2019
@MichaelMCoates MichaelMCoates dismissed stale reviews from dhamberlin and aziz512 via fd30fbd October 16, 2019 19:05
@MichaelMCoates
Copy link
Contributor Author

The custom window logic is still necessary for view-detached because of the way the routing works in of_events.

@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 16, 2019
@openfin-github-bot
Copy link

fd30fbd

Git

  • core: develop <= dev/coates/bv-event-propagation (fd30fbd)
  • js-adapter: develop <= dev/coates/bv-event-propagation (f231be5)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 16, 2019
@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 17, 2019
@openfin-github-bot
Copy link

bad0f85

Git

  • core: develop <= dev/coates/bv-event-propagation (bad0f85)
  • js-adapter: develop <= dev/coates/bv-event-propagation (f231be5)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 17, 2019
@MichaelMCoates
Copy link
Contributor Author

MichaelMCoates commented Oct 17, 2019

After talking with Pierre and Tommy, changed the eventing scheme to the following:

  • Windows can listen to view-attached and view-detached.
  • Views can listen to target-changed.
  • Window view events don't propagate up to Application and System.
  • All view events propagate up to Window, Application, and System.

The tests have been updated to reflect these changes.

@openfin-github-bot openfin-github-bot bot added auto testing started Bot started automated testing and removed auto testing done Bot completed automated testing labels Oct 17, 2019
@openfin-github-bot
Copy link

f877a7f

Git

  • core: develop <= dev/coates/bv-event-propagation (f877a7f)
  • js-adapter: develop <= dev/coates/bv-event-propagation (2289f59)
  • javascript-adapter: develop

Asars used for testing

Test results

@openfin-github-bot openfin-github-bot bot added auto testing done Bot completed automated testing and removed auto testing started Bot started automated testing labels Oct 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

auto testing done Bot completed automated testing cla-present

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants