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

Update workbench for 2.1 #1103

Merged
merged 7 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/context/ref/ChatRoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const chatRoom = {
providerName: "Symphony",
id: {
streamId: "j75xqXy25NBOdacUI3FNBH"
}
},
url: "http://symphony.com/ref/room/j75xqXy25NBOdacUI3FNBH___pqSsuJRdA",
name: 'My new room'
};
Expand Down
4 changes: 2 additions & 2 deletions toolbox/fdc3-workbench/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ export const App = observer(() => {
</Typography>
<Typography variant="body1">
For web applications to be FDC3-enabled, they need to run in the context of an agent that makes the
FDC3 API available to the application. This desktop agent is also responsible for lauching and
co-ordinating applications. It could be a browser extension, web app, or full-fledged desktop
FDC3 API available to the application. This desktop agent is also responsible for launching and
coordinating applications. It could be a browser extension, web app, or full-fledged desktop
container framework.
</Typography>
<Typography variant="body1">
Expand Down
12 changes: 8 additions & 4 deletions toolbox/fdc3-workbench/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,19 @@ export const Header = (props: { fdc3Available: boolean }) => {
console.error("Failed to retrieve FDC3 implementation info", e);
}


if (paramVersion) {
setChosenVersion(paramVersion);
} else if(implInfo?.fdc3Version && supportedVersion.includes(implInfo?.fdc3Version)) {
} else if(implInfo?.fdc3Version && implInfo.fdc3Version == "2.1") {
//API version 2.1 is backwards compatible with 2.0
setChosenVersion("2.0");
}else if(implInfo?.fdc3Version && supportedVersion.includes(implInfo.fdc3Version)) {
setChosenVersion(implInfo.fdc3Version);
} else {
setChosenVersion("2.0");
}

window.fdc3Version = chosenVersion;

};

updateInfo();
Expand All @@ -144,10 +147,11 @@ export const Header = (props: { fdc3Available: boolean }) => {
{supportedVersion.map((ver, index) => (
<span key={index}>
{ver === chosenVersion ? (
<span><b>{ver}</b></span>
//version 2.0 serves for both 2.0 and 2.1
<span><b>{ver == "2.0" ? "2.0+" : ver}</b></span>
) : (
<a className={`${classes.link}`} href={`?fdc3Version=${ver}`}>
{ver}
{ver == "2.0" ? "2.0+" : ver}
</a>
)}
{supportedVersion.length - 1 !== index && <span> | </span>}
Expand Down
6 changes: 5 additions & 1 deletion toolbox/fdc3-workbench/src/components/Intents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { Checkbox } from "@material-ui/core";
import { FormGroup } from "@material-ui/core";
import { FormControlLabel } from "@material-ui/core";
import { RadioGroup } from "@material-ui/core";
import { ToggleButton, ToggleButtonGroup } from "@material-ui/lab";
import { Alert, ToggleButton, ToggleButtonGroup } from "@material-ui/lab";
import InfoOutlinedIcon from "@material-ui/icons/InfoOutlined";

// interface copied from lib @material-ui/lab/Autocomplete
Expand Down Expand Up @@ -979,6 +979,10 @@ export const Intents = observer(({ handleTabChange }: { handleTabChange: any })
</RadioGroup>
</Grid>
)}
<Grid item xs={12}>
<Alert severity="info">Desktop Agents often require apps that listen for intents to include the intent in their appD record. Refer to your Desktop Agent's documentation if the workbench doesn't appear in the intent resolver.</Alert>
</Grid>

</Grid>
</form>
</div>
Expand Down
Loading