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

Add a how to add a service document #637

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

johnman
Copy link
Member

@johnman johnman commented Dec 4, 2023

Adding a document that covers the two main ways of adding a service to apply custom logic in the background.

Copy link
Contributor

@adam-saland adam-saland left a comment

Choose a reason for hiding this comment

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

Looks good just one is

@johnman johnman merged commit 333766d into workspace/v16.0.0 Dec 4, 2023
5 checks passed
obany added a commit that referenced this pull request Dec 8, 2023
* Add example using dynamic dock and persistence (#443)

* Add example using dynamic dock and persistence

* Update package lock

* Add additional comments

* Update dependencies

* Update packages

* Update packages

* Simplify - Contexts and intents  (#451)

* Simplify contexts and intents example

* Update readme

* Add example of notification link (#450)

* Simplify - Native window integration (#452)

* Native window integration simplify

* Linting

* Simplify the server auth example (#453)

* Simplify the bloomberg example (#454)

* Update versions

* Separate common content into each example (#478)

* Use common per example

* Use common per example

* Update customize-home-templates

* Update customize-home-templates

* Update customize-home-templates

* Update customize-home-templates

* Fix type references

* Fix type references

* Common copying

* Simplify package script

* Make bootstrapper types optional (#474)

* Bump core version to match runtime version. (#475)

* Update readme to include mention of bloomberg

* Update launcher to support a wider range of ids (#477)

* Split MS365 and SF examples

* Register with examples

* Add contents and intents example

* Separate dev extensions and manager portal

* Add use notification and use theming

* Add NWI example

* Fix examples

* Update dependencies

* Use lint rules

* Remove old flags

* Update dependencies

---------

Co-authored-by: John <[email protected]>

* Updated broker to support new instanceMode and also always create a new instance on fdc3 open (#479)

* Updated broker to support new instanceMode and also always create a new instance on fdc3 open

Updated broker to support new instanceMode and also always create a new instance on fdc3 open unless an instanceId is provided.

Also updated intent picker and tidied up a bit.

* Update docs and changelog

* Adding generated types and fin type

For customize-workspace builds we had to remove the types ignore from the gitignore file and made the decision to check in types to make it easier to see diffs.

* Added support for plugging in logic that can enrich context objects. (#480)

* Added support for plugging in logic that can enrich context objects.

* Updated after PR review

* Add ipv4 fix

* Workspace platform starter (#481)

* WIP

* Updated shapes

* Update launch script message

* Add ip4 fix

* More streamlining

* Final code changes

* Dependency update

* Address feedback

* Fixes

* Tighten schema types

* Bump versions

* Update dock to use dynamic refresh

* Merge v13

* Fallback for dock provider

* Dev/john/integrate with ms365 microflow (#482)

Added initial microflow examples

* Linting comments

* Generate templates (#484)

* Initial commit

* Remove example from webpack

* Add manifest support

* Add all provider types

* Fix automation tests

* Fix linting

* Add the native apps (#485)

* Updating order of a function and package lock

* Improve linting rules (#486)

* Updates to vnext

* Promote vnext to beta

* Updates

* Update to take advantage of customData in pages in 13.1 (#491)

* Update to take advantage of customData in pages in 13.1

* Add ordering of home results (#490)

* Add ordering of home results

* Remove MS365 requirements

* Update changelog

* Merge main to 13.1

* Add Microflow support (#494)

This change adds a microflow provider to the example platform to show how a platform developer could take advantage of OpenFin's Microflow support from within their platform in a configuration based way.

* Add support for additional verbs in fetch endpoints (#493)

* Minor type casing update.

* Renamed microflows to low code integrations (#495)

* Renamed microflows to low code integrations

* update to have consistent naming (#496)

Even though we are not treating this exactly as a module it is similarly configured and may be module based in the future.

* Added an example that shows the view options for iframes (#498)

* Added an example that shows the view options for iframes

We didn't have an example of loading content and using the api view options to disable the fin api. And how would you allow that content to (1) update the view title (2) if needed broadcast and listen to context.

* Improve the endpoints that use fetch (#497)

* Improve the endpoints that use fetch

* Update changelog

* Update changelog

* Address feedback

* Update local storage endpoint to support new format with metadata

* Update schemas and docs

* Update version usage

* Add docs

* Uodated changelog

* Update changelog

* Added support for sandboxing the iframe with some sensible defaults (#500)

* Added support for sandboxing the iframe with some sensible defaults

* Added gif

* Added support for synching context group and frame when fin/fdc3 is enabled (#501)

* Added support for synching context group and frame when fin and fdc3 is enabled on the frame

Also added two examples one with fin api injection and one without.

* Add link color support (#503)

* Update contacts and make configurable (#504)

* Update contacts and make configurable

* Fix version numbering

* Update offline versions

* Added ability to use the mappings from other samples and added ability to map from platform to fdc3 app. (#505)

* Added ability to use the mappings from other samples and added ability to map from platform to fdc3 app.

* Linting and type generation

* Workspace platform starter basic (#506)

* Add workspace platform starter basic

* Add store, dock and notifications

* Add example animation

* Fix merge

* Update the frame paths (#507)

* Not referencing parent.origin as that doesn't work cross origin. Not hardcoding origins or skipping the check (#510)

Re-using the hosts file for the purpose of the sample.

* Update vnext to 14

* Update dependencies

* Update schemas

* Document how the baseScore property works (#511)

* Add new tab app to platform basic

* Add file protocol support to manifest-hosts (#512)

* Fix packaging script

* Fix packaging script

* No contact data on 13.0

* Add notification platform sample

* Update dependencies

* renaming pre-13 file (#516)

* Update dependencies

* v14.0.0

* Update dependencies

* Remove exit test as driver is torn down before it can respond

* Update SF and MS to use async filters (#519)

* Browser show popup window (#381)

* Add example of showPopupWindow

* Add second button example

* Combine methods with flag

* Update origin paths

* Remove relative positioning

* Fix linting

* Linting

* Add a custom print menu to toolbar (#369)

* Add a custom print menu to toolbar

* Linting

* Update print methods

* Consistent naming

* Updated url

* Add a custom print menu to toolbar (#369)

* Add a custom print menu to toolbar

* Linting

* Update print methods

* Consistent naming

* Updated url

* Update manager portal to use common contacts (#513)

* Update manager portal to use common contacts

* Reset to 13.1

* Add splash screen (#515)

* Show splash screen on startup

* Update default progress

* Use custom theme and icon

* Add spinner

* Re-order init to remove querybeforeinit logic

* Assign title even without palette

* Add customization options

* Updated changelog

* Update types

* Update changelog

* Update platform uuid and log warning for setSearchQuery

* Use default uuid

* Add custom dock menu (#520)

* Add custom dock menu

* Add icon to custom menu entries

* Calculate menu position from click

* Vnext versions

* Update dependencies

* Add home suggestions (#525)

* Add home suggestions

* Add isSuggestion option to wps

* Update readme

* Update splash not always on top

* Add missing getting started

* Add missing getting started

* Update bloomberg dependency (#527)

* Update bloomberg dependency

* Updating prettier

* Dynamic dock menus (#526)

* Dynamic dock menus

* Backoff if already in progress

* Check for cache duration > 0

* Replace non alpha numeric with space to make title case (#528)

* Replace non alpha numeric with space to make title case

* Prettier

* Add dynamic dock menu for pages (#529)

* Add dynamic dock menu for pages

* Add sorting to pages

* Prettier

* Add html location to config

* Centralized the launchPage logic

* Update changelog

* Update changelog

* Fix to correctly include the source of the provider as a valid host. (#532)

* CSE-744 Update logic to reflect change in behaviour of window.iShowing() from v32 (#533)

* Fix to correctly include the source of the provider as a valid host.

* Updated to take into account v32 changes to isShowing

Updated naming and logic to reflect isShowing no longer considers a minimized window as isShowing === true.

---------

Co-authored-by: Martyn Janes <[email protected]>

* Replace Auth0 and Okta with openid-connect (#508)

* Replace Auth0 and Okta with openid-connect

* Update comments

* Update GHA

* Update auth example

* Update example auth provider

* Update with beta 2

* Update to 14.0.20

* OIDC auth provider (#536)

* Add OIDC auth provider

* Update changelog

* Added OpenID Connect info to auth docs

* Auth initialize only with enabled modules

* Fix helpers reference

* Added initial fav support (#538)

We have had discussions around this in the past. Here is something that would allow endpoints to be specified to store/retrieve/remove an object that represents a favorite. There is a set of understood types of thing you can favorite and this can be passed to modules so that actions, integrations and possibly other sections could utilize it.

---------

Co-authored-by: Martyn Janes <[email protected]>

* Allow toolbar buttons to be undefined (#539)

* Allow toolbar buttons to be undefined

* Rename platformSplash

* Fix platformSplashProvider typo

* Added cache retrieval strategy (#540)

* Added cache retrieval strategy

* Add types

* Remove Mac warnings (#541)

* Add request/response types for endpoints (#542)

* Add tray icon provider (#544)

* Add tray icon provider

* Add focus for hidden window

* Add defaultOption for tray

* Add callAction method

* Optional menu entries type

* Check for enabled flag

* Fix type definition

* Added an example favorite local storage endpoint module (#545)

* Adding an example endpoint for storage

* Added example module for storing favorites

* Applying feedback

* Add docs for splash screen and tray provider (#546)

* Add platform config for workspace analytics (#549)

* Add platform config for workspace analytics

* Move option to analytics provider

* Update ws versions to 14.0.21 (#547)

* Apps in home can be favorited (#550)

* Apps in home can be favorited

* Updates based on feedback

* Tidy up imports

* Add support for favorites in store (#551)

* Add support for favorites in store

* Rename customData to payload

* Use defined app action id

* Lookup app if not in last results list

* Update changelog

* Favorite conditions (#552)

* Add some conditions for favorites

* Update changelog

* Fix condition

* Add favorites menu (#553)

* Add favorites menu

* Add common menu functionality

* Use rootUrl for popup

* Add log for other types

* Fix the css path in menu popup (#554)

* Initialize actions even with no modules (#555)

* Only add fav entry if in command mode (#556)

* Add include in snapshot module (#557)

* Add include in snapshot module

* Add context data to checkCondition calls

* Strongly type the condition contexts

* Add ability to load apps from a url (#559)

* Rationalize the dock types (#560)

* Rationalize the dock types

* Reduce cognitive complexity

* Improve value type testing

* Fix linting

* Updated changelog

* Added an article to cover app assets and launch external process. (#561)

* Added an article to cover app assets and launch external process.

* Updated app asset path to take into account escaping.

* Applying feedback

* Update ws to 14.0.22 (#558)

* Update ws to 14.0.22

* Fix store favorite

* Update deps

* Update packages to 14.1.1

* Add v15

* Update automation tests

* Fix linting

* Create mixed platform and browser windows (#565)

* Create mixed platform and browser windows

* Update readme with old method for all platform windows

* Update to v15.0.3

* Notifications support (#564)

Initial example of putting a pattern around how a platform can use notifications across multiple teams within a platform.

The idea is to introduce a level of isolation between modules and allowing modules to be grouped and have settings to specify whether they should be a part of a platform or just show up in the all tab. Plus the options around whether the icon from a module should be enforced when it comes to notifications.

This pattern also means that modules do not need to bundle notification code from the workspace module as it is injected. It also ensures all modules use the same version.

- Notification Client created and Notification Provider supports a getNotificationClient function that can be passed options.
- Docs updated
- Changelog updated
- Example lifecycle module added demonstrating notification client use.
- Main manifest updated with example lifecycle module reference but disabled.

* Additional FDC3 2.0 Enhancements (#572)

* Added initial support to fdc3.open and passed fdc3 2.0 open tests

* Added logic for awaiting instanceId on broker connection

When opening an app via fdc3 we should await the connection to the broker to get the endpointId which acts as a unique instance id that cannot be specified by an app.

* Updated findInstances so that it can find all app instances but, if you are looking for instances to show in an intent picker then narrow it down to only include the app if it has registered an intent handler.

* Updates for fdc3 2.0 conformance

* Support context listeners that act as a context type catch all and update docs.

* Ability to turn off window positioning strategy and extra defensive coding for window positioning strategy

* Added additional error handling around trying to determine if a window is visible and what it's bounds are because during an automation related test where many windows are being launched and closed there is a chance that a reference to a window no longer exists when you try to get whether it is showing or it's position.

As window layout strategy is really for an end user it serves little benefit during testing where the goal is to run automation tests as quickly as possible. Therefore the option to disable the window positioning strategy has been added.

* Added a try catch around logging the created window options

In some automation scenarios this window may be closed shortly after creation so we want to ensure there are no errors bubbling for what is a developer support information and not core functionality.

* Update doc based on feedback

* Add favorites support to pages and workspaces (#573)

* Add favorites support to pages and workspaces

* Updated based on feedback

* Update based on feedback

* Added deprecated theme methods

* Correct menu location depending on menu type

* Add icon support to native menu

* Custom menu disabled option

* Update to 15.0.5

* Add dock endpoints for config and enable rearrange (#574)

* Added support for new mixed platform window support (#575)

* Added support for new mixed platform window support

Added support for launchPreference where you can specify some settings for views or windows with an extra option for views where you can specify a platform window instead of a browser window.

Added a platform window example with theme support.

Added support for apps-*.json for schema support for intellisense.

* Updated app related docs to include launchPreference setting.

* Override popup menus (#576)

* Add full custom popup menu support for platform overrides

* Updated launchPreferences (#577)

* Updated launchPreferences

Added a number of additional options and moved them to a host object within view. Updated platform window to use title if provided

* Add new init options support to composite page module (#578)

The page composite module now supports launching/showing a page by specifying init params (similar to querystring params). This will either launch the page or bring it to front if it was already loaded.

It is launched using the following structure:
fins://domain/yourmanifest.fin.json?$$action=show-page&$$payload=eyAicGFnZUlkIjogImIwY2UxNTg3LTM2ZDAtNGRlZC05ZGU3LTlmNmQyYjc1OGYyNyIgfQ==

A localhost example:

fin://localhost:8080/manifest.fin.json?$$action=show-page&$$payload=eyAicGFnZUlkIjogImIwY2UxNTg3LTM2ZDAtNGRlZC05ZGU3LTlmNmQyYjc1OGYyNyIgfQ==

The payload is a base64 encoded string of a json object containing a pageId e.g.

{ "pageId": "b0ce1587-36d0-4ded-9de7-9f6d2b758f27" }

This pageId is unlikely to exist on your setup but it is just an example.

The module is enabled via the initProvider configuration in manifest.fin.json but the configuration can be disabled or removed if you don't want this support.

	"initOptionsProvider": {
		"modules": [
			{
				"enabled": true,
				"id": "show-page",
				"title": "Init Options Show Page",
				"url": "http://localhost:8080/js/modules/composite/pages.bundle.js",
				"data": {
					"supportedActions": ["show-page"]
				}
			}
		]
	},
The launchPage helper method passed to modules has been updated so that it now accepts a pageId instead of requiring modules to look up the page object and pass it.

the condition function (used to check to see if a certain condition is true) has also been moved from integration helpers to the base module helpers object to allow more modules to check for conditions.

Changelog has been updated to include the changes.

* Add global settings for menu styles (#579)

* Add global settings for menu styles

* Remove fav warning if disabled

* Update changelog

* Allow module developers to have access to endpoints (#580)

* Updated module helpers to allow platforms to expose endpoints to module developers.

* Updated docs

* Applying feedback

* Add support for the OpenFin PopupWindow API for the Intent Picker and make the picker monitor aware

- Breaking Change - We have updated the way an interop broker communicates with an intent picker window. We were using a reference to the WebWindow to add a function from the broker to the intent picker window. This works but would not work cross domain. OpenFin also introduced the showPopupWindow API since this approach was used so we have now switched to using the showPopupWindow which works cross domain. This means that you can not build you own intent window that receives the list of applications and intent/context via customData passed to the window and it can return the selection using await fin.me.dispatchPopupResult({ appId, instanceId, intent }); if a selection is made or await fin.me.dispatchPopupResult(); if the user cancelled the intent selection. Our example intent pickers have been updated: [instance-picker.html](./public/common/windows/intents/instance-picker.html) and [picker.html](./public/common/windows/intents/picker.html)
- New Feature - The intent picker now tries to appear in the center of the monitor from where the intent was raised (rather than always showing up on the main monitor).
- Fix - Fixed the basic intent picker that wasn't working correctly.

* Popup menu improvements (#582)

* Popup menu improvements

* Update changelog

* Dependency update

* Fix image conversion for menus (#586)

* Fix image conversion for menus

* Fix linting

* InteropBroker refactor (#587)

* InteropBroker refactor

Broken out some of the helper functions from the interopbroker and also removed the intent related functions from the app provider.

* Added support for endpoint support for manifest fetching and tidied helpers (#588)

Removed the theme related functions that were at the root of module helpers as they are now available through getThemeClient. The TS Types are there to indicate they no longer exist and the changelog has been updated to reflect the change. This now follows our getXClient pattern.

New support for specifying endpoints for fetching the manifest json url specified in an app definition. A platform can specify an endpoint called manifest-get if it wants to override the default fetch. If a platform wants a specific behavior for a specific app then they can set an endpoint called manifest-get-app-id.

The default fetch implementation for endpoints has been enhanced. Now you can have an endpoint defined with different options for fetch but no url and have the request contain the url when calling request/response etc. This is used to allow platform devs to provide additional fetch options specific to their platform but have the manifest url passed without the need to have a custom endpoint module created.

e.g.

{
	"id": "manifest-get",
	"type": "fetch",
	"options": {
	      "method": "GET"
		}
	}

* Reverted back to web window approach until a future runtime release (#590)

Reverted back to web window approach until a future runtime release

Also updated includeInSnapshot reference to be includeInSnapshots.

Updated comments for functions.

Updated utils position to round the numbers for x and y.

Updated intent pickers to support web window approach again.

Typed the tray window options and updated the other broker example

* Updated examples of default window options and decommission windowOptions (#591)

* Updated manifests and added title check. (#593)

* Updated manifests and added title check.

* Added an example of launching a saved workspace via init options (#595)

* Update workspace platform to encourage initOptionsProvider (#596)

* Update changelog.

* Update to 15.0.6

* Update version numbers

This build is still not building.

* Resolve build errors

Although still determining why workspace platform is not under node_modules/@openfin

* Add url and channel support (#598)

* Add url and channel support

* Update schema

* Update conditions to client pattern (#599)

* Updated package lock

* Fix duplicate section in manifest

* Update to node-adapter. Fix some projects.

* Update to Next.

* Update to match v15

* Applied suggested typo changes in readme and applied fixes. (#604)

* Applied suggested typo changes in readme and applied fixes.

* Tidy up share

add applyWorkspace logic:

If you have not loaded anything or have opened and then closed windows then there should be no prompt on whether or not you wish to load a workspace. We do not override the skipPrompt if it has been passed to applyWorkspace but we determine whether or not it should be skipped on first load.

* Update to 15.0.8

* Update dependencies

* Added docs and minor fix (#605)

* Add metadata to all storage endpoints (#606)

* Update launchPreference Option structure (#607)

* Update launchPreference Option structure

* Add v16.0.0 branch

* Add Snap Integration to Workspace Platform Starter (#608)

* Added snap to WPS

* Update ws to 15.0.11 (#612)

* Remove override

* Add native launch support

* Update docs

* Add native app snapshot logic

* Update asset url

* Added docs

* Fix typo

* Add snap app

* Add content creation rule modules (#616)

* Add content creation rule modules

* Update naming

* Improve content creation logic

* Move actions to modules (#619)

* Move actions to modules

* Reduce module size

* Improve imports

* Fixed and improvements (#620)

* Fixed and improvements

* Update dummy filter

* Update dependencies

* Root public apps are now all for the developer (#621)

* Async filter improvements (#622)

* Fix ordering of async filters

* Remove empty filters

* Fix typo

* Individual validate (#623)

* Move validation to each repo

* Sort dependencies

* Add prettier-check script

* Fix npm command

* Add documentation for init options (#624)

* Add documentation for init options

* Update docs to include template generation instructions

* Fix typo

* Improve the packaging scripts (#627)

* Improve the packaging scripts

* Move prepare-npm script

* Fix help entries in home, move outside async debounce

* Dev/john/dynamic launch preference (#626)

* Add unit testing examples (#630)

* Minor tweaks (#631)

* Add unit test to GHA lint

* Separate lint and test

* Add check for undefined when it goes through the launch preference checks. (#632)

* Testing use JSDOM environment

* Cache modules

* Adding adaptable to the list of examples (#633)

* Add e2e testing to wps (#634)

* Consistent GitHub Actions

* Add push trigger

* Remove push trigger

* E2e start the server

* Add build step for e2e

* E2E Wait for server to start

* Remove push trigger

* Only trigger if wps has changed

* Dev/john/salesforce update (#635)

* Update salesforce integration to support concept of apps with updatable options

* Update launch preferences so that native apps can also take args via app config or dynamically

Updated to allow you to specify that an app can have new command line args passed to it dynamically. Or it can also be specified via launchPreferences -> options -> native -> arguments (array)

* Add a how to add a service document (#637)

* Add a how to add a service document

* Add support for reshow for when a desktop shortcut is used (#638)

* Add support for reshow for when a desktop shortcut is used

* Fix isObject

* Update to 16.0.9 and wider json schema support (#639)

* Update to 16.0.9 and wider json schema support

We now support 16.0.9 and we have generated additional schemas for OpenFin Manifests (that are not targeting Workspace Platform Starter) and WPS Manifests that include the OpenFin Manifest and the Custom Settings of WPS.
Updated the vscode settings.json to apply the schema intelligently.

* Update based on feedback

Made module options optional for endpoints and updated code to reflect it. Updated pack manifest to match naming convention so that schema will apply.

* Update FetchEndpointDefinition to just use FetchOptions

* Linting for root script

* Linting

* Add @openfin/node-adaptor to root to satisfy peerDependency

* Add Mac awareness where launch external purpose and download app asset are concerned (#640)

* Add Mac awareness where launch external purpose and download app asset are concerned.

Updated logic to handle current launchExternalProcess and downloadAppAsset support in the Mac RVM. In apps.ts we filter out native or app asset applications and if Snap is enabled then we log a warning and do not try to enable the Snap SDK.

* Moved the capability logic into a capability util file.

* Content creation rule matching check rule exists in event

* Share refactor (#641)

* Share refactoring

* Add dialog confirmations

* Update manifest

* Update changelog

* Documentation

* Add notifications disabled fallback

* Add additional pack files

* Simplify GHA

* basic sharing with init pattern (#642)

* Share refactoring

* Add dialog confirmations

* Update manifest

* Update changelog

* basic sharing with init pattern

* Documentation

* Add notifications disabled fallback

* Add additional pack files

* Simplify GHA

* Fix platform override

---------

Co-authored-by: Martyn Janes <[email protected]>

* Update changelog

---------

Co-authored-by: John <[email protected]>
Co-authored-by: Joe Ransegnola <[email protected]>
Co-authored-by: adam-saland <[email protected]>
@obany obany deleted the dev/john/v16-document-updates branch December 8, 2023 12:01
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.

2 participants