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

Provide details about support for optional API features in ImplementationMetadata #636

Closed
kriswest opened this issue Mar 24, 2022 · 0 comments · Fixed by #753
Closed

Provide details about support for optional API features in ImplementationMetadata #636

kriswest opened this issue Mar 24, 2022 · 0 comments · Fixed by #753
Labels
api FDC3 API Working Group enhancement New feature or request formal specification

Comments

@kriswest
Copy link
Contributor

kriswest commented Mar 24, 2022

Enhancement Request

Use Case:

One of the goals of the FDC3 standard is to allow apps from vendors to interoperate with each other in a standardized fashion, via a compliant implementation of the Desktop Agent API. However, as the standard can contain optional features (indicated via the SHOULD or MAY keywords) it would be helpful to define, as part of the standard, how support for these features can be queried or tested.

Proposal

The fdc3.getInfo() call added in 1.2 returns an ImplementationMetadata object that contains information about the FDC3 standard version and Desktop Agent implementation and would seem an ideal place to also insert details of which optional features are supported, e.g..

enum OptionalFeatures {
   "USER_CHANNEL_PICKER": "UserChannelPicker",
   ... // further optional features
}

public interface ImplementationMetadata {
  fdc3Version: string;
  provider: string;
  providerVersion?: string;
  optionalFeatureSupport: Record<OptionalFeatures, boolean>;
}

Usage example:

//Check for an optional feature
if (fdc3.getInfo) {
  let implementationMetadata = await fdc3.getInfo();
  if (!implementationMetadata.optionalFeatureSupport[OptionFeatures.USER_CHANNEL_PICKER]) {
      //render our own channel picker as the Desktop Agent doesn't provide one
  }
} else {
  //fdc3 version < 1.2 or non-compliant implementation
}

Additional information

Optional features can and should be added to the enumeration alongside the work on #484 to formalize compliance information throughout the standard

@kriswest kriswest added enhancement New feature or request api FDC3 API Working Group labels Mar 24, 2022
@kriswest kriswest added this to the 2.0-candidates milestone May 17, 2022
@kriswest kriswest modified the milestones: 2.0-candidates, 2.0 May 27, 2022
@kriswest kriswest modified the milestones: 2.0, 2.0-release-tasks Jun 13, 2022
@kriswest kriswest removed the needs-pr label Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api FDC3 API Working Group enhancement New feature or request formal specification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant