Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace (rename) iframe messages in FDC3 for the web to avoid potential conflicts #1375

Merged
merged 5 commits into from
Sep 25, 2024

Conversation

kriswest
Copy link
Contributor

@kriswest kriswest commented Sep 24, 2024

This PR renames the iframe* messages in FDC3 for the web to make clashes on the type field value for iFrameHello and to make them less web specific as they might be used in other languages as part of the DACP - as requested in the review by @novavi:
#1191 (comment)

THis doesn't materially change the process proposed, just some string values - but its best done now as it would be a breaking change later.

@kriswest kriswest requested a review from a team as a code owner September 24, 2024 16:18
@kriswest kriswest removed the request for review from a team September 24, 2024 16:19
"description": "Handshake message sent back to an iframe from the DA proxy code (setup by `getAgent()`) over the `MessagePort` provide in the preceding iFrameHello message, confirming that it is listening to the `MessagePort` for further communication.",
"$id": "https://fdc3.finos.org/schemas/next/api/fdc3UserInterfaceHandshake.schema.json",
"title": "Fdc3 UserInterface Handshake",
"description": "Handshake message sent back to a user interface from the DA proxy code (setup by `getAgent()`) over the `MessagePort` provide in the preceding iFrameHello message, confirming that it is listening to the `MessagePort` for further communication.",
Copy link

Choose a reason for hiding this comment

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

No big deal, but if you wanted to be consistent with the descriptions in the other schemas you could say "a UI" instead of "a user interface".

Copy link
Contributor Author

It didn't work wonderfully with camel case so I ended up with UserInterface which felt more legible.

Adjusted in WCP1Hello and WCP3Handshake for consistency (replaced UI with user interface and completed a sentence fragment I noticed at the same time)


Messages are also provided that are specific to each interface type provided by a Desktop Agent. The following messages are specific to Channel Selector user interfaces:

- [`iFrameChannels`](https://fdc3.finos.org/schemas/next/api/iFrameChannels.schema.json): Sent by the parent frame to initialize a Channel Selector user interface by providing metadata for the Desktop Agent's user channels and details of any channel that is already selected. This message will typically be sent by a `getAgent()` implementation immediately after the `iFrameHandshake` and before making the injected iframe visible.
- [`iFrameChannelSelected`](https://fdc3.finos.org/schemas/next/api/iFrameChannelSelected.schema.json): Sent by the Channel Selector to indicate that a channel has been selected or deselected.
- [`fdc3UserInterfaceChannels`](https://fdc3.finos.org/schemas/next/api/fdc3UserInterfaceChannels.schema.json): Sent by the parent frame to initialize a Channel Selector user interface by providing metadata for the Desktop Agent's user channels and details of any channel that is already selected. This message will typically be sent by a `getAgent()` implementation immediately after the `fdc3UserInterfaceHandshake` and before making the injected iframe visible.
Copy link

Choose a reason for hiding this comment

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

fdc3UserInterfaceChannels should be Fdc3UserInterfaceChannels
(This is assuming the block above containing Fdc3UserInterfaceHello / Fdc3UserInterfaceHandshake / Fdc3UserInterfaceDrag / Fdc3UserInterfaceDrag was the correct case.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was fixed earlier in 0d2c9a4

- [`iFrameChannels`](https://fdc3.finos.org/schemas/next/api/iFrameChannels.schema.json): Sent by the parent frame to initialize a Channel Selector user interface by providing metadata for the Desktop Agent's user channels and details of any channel that is already selected. This message will typically be sent by a `getAgent()` implementation immediately after the `iFrameHandshake` and before making the injected iframe visible.
- [`iFrameChannelSelected`](https://fdc3.finos.org/schemas/next/api/iFrameChannelSelected.schema.json): Sent by the Channel Selector to indicate that a channel has been selected or deselected.
- [`fdc3UserInterfaceChannels`](https://fdc3.finos.org/schemas/next/api/fdc3UserInterfaceChannels.schema.json): Sent by the parent frame to initialize a Channel Selector user interface by providing metadata for the Desktop Agent's user channels and details of any channel that is already selected. This message will typically be sent by a `getAgent()` implementation immediately after the `fdc3UserInterfaceHandshake` and before making the injected iframe visible.
- [`fdc3UserInterfaceChannelSelected`](https://fdc3.finos.org/schemas/next/api/fdc3UserInterfaceChannelSelected.schema.json): Sent by the Channel Selector to indicate that a channel has been selected or deselected.
Copy link

Choose a reason for hiding this comment

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

fdc3UserInterfaceChannelSelected should be Fdc3UserInterfaceChannelSelected

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was fixed earlier in 0d2c9a4

@kriswest kriswest merged commit eeb96f8 into fdc3-for-web Sep 25, 2024
2 checks passed
@kriswest kriswest deleted the fdc3-for-web-namespace-iframe-messages branch September 25, 2024 09:48
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.

3 participants