updated all links
MODIFY
src/client/src/components/Card/index.tsx
src/client/src/components/Card/index.tsx
@@ -10,6 +10,7 @@ import styles from "./styles.module.css";
import { IOption } from "../../types/option";
import { Link } from "react-router-dom";
import { ROUTES } from "../../utils/constants";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface IProps {
buttonText: string;
@@ -53,6 +54,7 @@ export const Card = ({
className={styles.details}
to={ROUTES.PAGE_DETAILS}
tabIndex={disabled! ? -1 : 0}
+ onKeyUp={spaceKeyHandler}
>
<FormattedMessage id="card.details" defaultMessage="Details" />
</Link>

MODIFY
src/client/src/components/Details/index.tsx
src/client/src/components/Details/index.tsx
@@ -19,6 +19,7 @@ import {
InjectedIntl,
FormattedMessage
} from "react-intl";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface IProps {
detailInfo: IOption;
@@ -41,7 +42,7 @@ const Details = ({
intl
}: IProps) => {
const LinkRenderer = (props: any) => (
- <a href={props.href} className={styles.link}>
+ <a href={props.href} className={styles.link} onKeyUp={spaceKeyHandler}>
{props.children}
</a>
);
@@ -156,6 +157,7 @@ const Details = ({
<a
className={styles.link}
href={licenseObject.url}
+ onKeyUp={spaceKeyHandler}
>
{licenseObject.text}
</a>

MODIFY
src/client/src/components/LoginCard/index.tsx
src/client/src/components/LoginCard/index.tsx
@@ -11,6 +11,7 @@ import { FormattedMessage } from "react-intl";
import { IOption } from "../../types/option";
import { ROUTES } from "../../utils/constants";
import { azureMessages } from "../../mockData/azureServiceOptions";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface IProps {
cardTitle: string;
@@ -42,6 +43,7 @@ const LoginCard = ({
<Link
className={styles.details}
onClick={() => handleDetailsClick(option)}
+ onKeyUp={spaceKeyHandler}
to={ROUTES.PAGE_DETAILS}
>
<FormattedMessage id="loginCard.details" defaultMessage="Details" />
@@ -61,6 +63,7 @@ const LoginCard = ({
<a
className={styles.createAccountButton}
href="https://azure.microsoft.com/free/"
+ onKeyUp={spaceKeyHandler}
>
<FormattedMessage
id="loginCard.createAccount"

MODIFY
src/client/src/components/TopNavBarLink/index.tsx
src/client/src/components/TopNavBarLink/index.tsx
@@ -3,6 +3,7 @@ import * as React from "react";
import { Link } from "react-router-dom";
import styles from "./styles.module.css";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
const TopNavBarLink = ({
pageNumber,
@@ -31,6 +32,7 @@ const TopNavBarLink = ({
to={path}
onClick={handleClick}
className={styles.container}
+ onKeyUp={spaceKeyHandler}
>
<div
className={classnames(styles.text, {

MODIFY
src/client/src/containers/About/index.tsx
src/client/src/containers/About/index.tsx
@@ -6,6 +6,7 @@ import { getVersionsSelector } from "../../selectors/vscodeApiSelector";
import { IVersions } from "../../types/version";
import { defineMessages, InjectedIntlProps, injectIntl } from "react-intl";
import { AppState } from "../../reducers";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface IStateProps {
versions: IVersions;
@@ -38,6 +39,7 @@ const About = ({ versions, intl }: Props) => {
<a
className={styles.link}
href="https://github.com/Microsoft/WebTemplateStudio"
+ onKeyUp={spaceKeyHandler}
>
Web Template Studio
</a>

MODIFY
src/client/src/containers/AzureFunctionsModal/index.tsx
src/client/src/containers/AzureFunctionsModal/index.tsx
@@ -42,6 +42,7 @@ import { getVSCodeApiSelector } from "../../selectors/vscodeApiSelector";
import RootAction from "../../actions/ActionType";
import { messages } from "./messages";
import classNames from "classnames";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
const DEFAULT_VALUE = {
value: "Select...",
@@ -335,6 +336,8 @@ const AzureFunctionsResourceModal = (props: Props) => {
tabIndex={disabled ? -1 : 0}
className={styles.link}
href={links[formSectionId]}
+ onKeyUp={spaceKeyHandler}
+
>
{rightHeader}
</a>

MODIFY
src/client/src/containers/AzureLogin/index.tsx
src/client/src/containers/AzureLogin/index.tsx
@@ -25,6 +25,7 @@ import { withLocalPath } from "../../utils/getSvgUrl";
import { AppState } from "../../reducers";
import { Dispatch } from "redux";
import RootAction from "../../actions/ActionType";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface IDispatchProps {
setDetailPage: (detailPageInfo: IOption) => any;
@@ -73,6 +74,7 @@ class AzureLogin extends React.Component<Props> {
tabIndex={0}
to={ROUTES.REVIEW_AND_GENERATE}
className={styles.optionalFlag}
+ onKeyUp={spaceKeyHandler}
>
{azureMessages.azureSkipButton.defaultMessage}
</Link>

MODIFY
src/client/src/containers/CosmosResourceModal/index.tsx
src/client/src/containers/CosmosResourceModal/index.tsx
@@ -42,6 +42,7 @@ import { ThunkDispatch } from "redux-thunk";
import RootAction from "../../actions/ActionType";
import { messages } from "./messages";
import classNames from "classnames";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
const DEFAULT_VALUE = {
value: "Select...",
@@ -321,6 +322,7 @@ const CosmosResourceModal = (props: Props) => {
tabIndex={disabled! ? -1 : 0}
className={styles.link}
href={links[formSectionId]}
+ onKeyUp={spaceKeyHandler}
>
{rightHeader}
</a>

MODIFY
src/client/src/containers/PostGenerationModal/index.tsx
src/client/src/containers/PostGenerationModal/index.tsx
@@ -26,6 +26,7 @@ import { getOutputPath } from "../../selectors/wizardSelectionSelector";
import { strings as messages } from "./strings";
import { resetWizardAction } from "../../actions/wizardInfoActions/resetWizardAction";
import { MODAL_TYPES } from "../../actions/modalActions/typeKeys";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface LinksDict {
[serviceId: string]: string;
@@ -73,7 +74,7 @@ const PostGenerationModal = ({
}: Props) => {
const { formatMessage } = intl;
const LinkRenderer = (props: any) => (
- <a href={props.href} className={styles.link}>
+ <a href={props.href} className={styles.link} onKeyUp={spaceKeyHandler}>
{props.children}
</a>
);
@@ -221,6 +222,7 @@ const PostGenerationModal = ({
<a
className={styles.link}
href="https://github.com/Microsoft/WebTemplateStudio/issues"
+ onKeyUp={spaceKeyHandler}
>
{formatMessage(messages.help)}
</a>

MODIFY
src/client/src/containers/ReviewAndGenerate/index.tsx
src/client/src/containers/ReviewAndGenerate/index.tsx
@@ -12,6 +12,7 @@ import { defineMessages, InjectedIntlProps, injectIntl } from "react-intl";
import { ThunkDispatch } from "redux-thunk";
import { AppState } from "../../reducers";
import RootAction from "../../actions/ActionType";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface IDispatchProps {
openViewLicensesModal: () => any;
@@ -65,6 +66,7 @@ const ReviewAndGenerate = (props: Props) => {
rel="noopener noreferrer"
className={styles.link}
href="https://github.com/Microsoft/WebTemplateStudio/issues"
+ onKeyUp={spaceKeyHandler}
>
{formatMessage(messages.giveFeedback)}
</a>

MODIFY
src/client/src/containers/RightSidebar/index.tsx
src/client/src/containers/RightSidebar/index.tsx
@@ -42,6 +42,7 @@ import { IOption } from "../../types/option";
import { IVSCodeObject } from "../../reducers/vscodeApiReducer";
import { getVSCodeApiSelector } from "../../selectors/vscodeApiSelector";
import { isValidNameAndProjectPathSelector } from "../../selectors/wizardSelectionSelector";
+import spaceKeyHandler from "../../utils/spaceKeyHandler";
interface IDispatchProps {
selectBackendFramework: (framework: ISelected) => void;
@@ -224,6 +225,7 @@ class RightSidebar extends React.Component<Props, IRightSidebarState> {
<a
target="_blank"
rel="noopener noreferrer"
+ onKeyDown={spaceKeyHandler}
className={styles.link}
href="https://github.com/Microsoft/WebTemplateStudio/issues"
>

MODIFY
src/client/src/translations/whitelist_en.json
src/client/src/translations/whitelist_en.json
"details.none",
"draggableSidebarItem.changeItemName",
"loginCard.details",
- "loginCard.createAccount",
"loginCard.signIn",
+ "loginCard.createAccount",
"outputPath.outputPath",
"outputPath.ariaOutputPath",
"selectableCard.details",
"topNavBar.ariaNavLabel",
"topNavBar.frameworks",
"topNavBar.services",
- "topNavBar.pages",
"topNavBar.summary",
"topNavBar.newProject",
"about.templatesVersion",
"azureFunctionsModal.ariaNumFunctionsLabel",
"azureFunctionsModal.appNameLabel",
"azureFunctionsModal.ariaAppNameLabel",
- "azureFunctionsModal.appName",
"azureFunctionsModal.createFunctionApp",
"azureFunctionsModal.appNameSubLabel",
"azureFunctionsModal.runtimeStackSubLabel",
"azureSubscriptions.azureCosmosBody",
"azureSubscriptions.azureFunctions",
"azureSubscriptions.cosmosResource",
+ "hostingServices.title",
+ "storageServices.title",
"cosmosDBSelection.edit",
"cosmosResourceModule.apiLabel",
"cosmosResourceModule.ariaApiLabel",
"cosmosResourceModule.createCosmosRes",
"cosmosResourceModule.internalName",
"cosmosResourceModule.accountNameSubLabel",
- "cosmosResourceModule.locationSubLabel",
- "cosmosResourceModule.apiSubLabel",
"dependencyChecker.installedMessage",
"dependencyChecker.notInstalledMessage",
"dependencyChecker.iconAltMessage",
"sortablePageList.pages",
"summarySection.duplicateName",
"viewLicensesModal.closeModalLabel",
+ "azureSkip.buttonTitle",
"azureLogin.azureTitle",
"azureLogin.azureCardBody",
"azureLogin.longDescription",
"azureLogin.azureLoginTitle",
+ "azureLogin.azureLoginInfo",
"azureFunctions.Title",
"azureFunctions.cardBody",
"cosmosDb.title",
"cosmosDb.longDescription",
"cosmosDb.cardBody",
"azureModal.chooseExisting",
- "azureModal.createNewResourceGroupDisplayMessage",
- "azureModal.createNewResourceGroupSelectedDisplayMessage",
"azureModal.subscriptionLabel",
"azureModal.ariaSubscriptionLabel",
"azureModal.resourceGroupLabel",

updated all links