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

chore(repo): Update main-4.x for Jan release #2148

Merged
merged 6 commits into from
Jan 14, 2025
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
736 changes: 525 additions & 211 deletions accessibility-checker-extension/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion accessibility-checker-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@carbon/react": "1.25.0",
"@carbon/react": "^1.72.0",
"@carbon/themes": "^11.17.0",
"dotenv-webpack": "^7.0.3",
"exceljs": "^4.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class ReportSection extends React.Component<ReportSectionProps, ReportSec
<Button
kind="tertiary"
disabled={totalCount === 0}
style={{ float: "right", minHeight: "18px", maxHeight: "32px", minWidth: "10rem" }}
style={{ float: "right", minHeight: "18px", maxHeight: "32px", minWidth: "10rem", alignItems: "center" }}
onClick={() => this.devtoolsController.exportXLS("last") }
>Export XLS</Button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,8 @@ export class ReportTreeGrid<RowType extends IRowGroup> extends React.Component<R
}}
>turn off focus view</Link>, <Link
inline={true}
onClick={() => {
this.props.onResetFilters;
}}
>select all issue types</Link>, and do not filter hidden issues.
onClick={()=>this.props.onResetFilters() }
>reset the filters</Link>, and do not filter hidden issues.
</div>
} else {
// Calculate all of the show/hide/checked states
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ import {
InlineLoading,
Modal,
Grid,
OverflowMenu,
OverflowMenuItem,
Switch,
Tooltip,
Link,
ComboButton,
MenuItem,
MenuItemDivider
} from "@carbon/react";
import {
Keyboard,
KeyboardOff
} from "@carbon/react/icons";
import { ListenerType } from '../../messaging/controller';
import { ChevronDown } from "@carbon/react/icons";
import "./scanSection.scss";
import { getDevtoolsAppController } from '../devtoolsAppController';
import { DefinitionTooltip } from '@carbon/react';
Expand Down Expand Up @@ -323,70 +323,101 @@ export class ScanSection extends React.Component<{}, ScanSectionState> {
<Grid>
<Column sm={4} md={8} lg={8}>
<div style={{display: "flex", flexWrap: "wrap", gap: "1rem"}}>
<div style={{flex: "0 1 8.75rem"}}>
<div style={{flex: "0 1 8.75rem",paddingRight:"1rem"}}>
<div style={{display: "flex"}}>
<div style={{flex: "1 1 8.75rem", maxWidth: "8.75rem" }}>
{this.state.scanningState !== "idle" && <InlineLoading
className="inlineLoading"
description={"Scanning"}
style={{minWidth: "8.75rem", paddingLeft: ".5rem" }}
style={{minWidth: "8.75rem", }}
status={this.state.scanningState !== "done" ? 'active' : 'finished'}
/>}
<Button
ref={this.scanRef}
style={{
display: this.state.scanningState !== "idle" ? "none": undefined,
minWidth: "8.75rem"
}}
accesskey="s"
size="sm"
disabled={this.state.pageStatus !== "complete" || !this.state.canScan}
onClick={() => {
this.scan();
}
}>Scan</Button>
</div>
<OverflowMenu
data-floating-menu-container
size="sm"
ariaLabel="stored scans"
renderIcon={ChevronDown}
>
{/* <OverflowMenuItem
disabled={!this.state.reportContent}
itemText="Download current scan"
onClick={() => this.devtoolsController.exportXLS("last") }
/> */}
<OverflowMenuItem
// if scanStorage false not storing scans, if true storing scans
itemText= {this.state.storeReports ? "Stop storing scans" : "Start storing scans"}
onClick={() => {
this.devtoolsController.setStoreReports(!this.state.storeReports);
}}
/>
<OverflowMenuItem
disabled={this.state.storedReportsCount === 0} // disabled when no stored scans or 1 stored scan
itemText="Export stored scans"
onClick={() => this.devtoolsController.exportXLS("all") }
/>
<OverflowMenuItem
disabled={this.state.storedReportsCount === 0} // disabled when no stored scans or 1 stored scan
itemText="View stored scans"
onClick={async () => {
await devtoolsAppController.setSecondaryView("stored");
devtoolsAppController.openSecondary(".cds--overflow-menu[aria-label='stored scans']");
}}
/>
<OverflowMenuItem
disabled={this.state.storedReportsCount === 0}
isDelete={this.state.storedReportsCount > 0}
hasDivider
itemText="Delete stored scans"
onClick={() => {
this.setState({ confirmClearStored: true });
}}
/>
</OverflowMenu>

<ComboButton
label="Scan"
menuAlignment="bottom-start"
ref={this.scanRef}
style={{
display:
this.state.scanningState !==
"idle"
? "none"
: undefined,
minWidth: "8.75rem",
}}
accesskey="s"
size="sm"
disabled={
this.state.pageStatus !==
"complete" ||
!this.state.canScan
}
onClick={() => {
this.scan();
}}
>
<MenuItem
// if scanStorage false not storing scans, if true storing scans
label={
this.state.storeReports
? "Stop storing scans"
: "Start storing scans"
}
onClick={() => {
this.devtoolsController.setStoreReports(
!this.state.storeReports
);
}}
/>
<MenuItem
label="Export stored scans"
disabled={
this.state
.storedReportsCount ===
0
}
onClick={() =>
this.devtoolsController.exportXLS(
"all"
)
}
/>
<MenuItem
label="View stored scans"
disabled={
this.state
.storedReportsCount ===
0
} // disabled when no stored scans or 1 stored scan
onClick={async () => {
await devtoolsAppController.setSecondaryView(
"stored"
);
devtoolsAppController.openSecondary(
".cds--overflow-menu[aria-label='stored scans']"
);
}}
/>
<MenuItemDivider />

<MenuItem
disabled={
this.state
.storedReportsCount ===
0
}
isDelete={
this.state
.storedReportsCount > 0
}
label="Delete stored scans"
onClick={() => {
this.setState({
confirmClearStored:
true,
});
}}
/>
</ComboButton>
</div>
</div>
<div style={{flex: "1 1 8.75rem"}}>
Expand Down
33 changes: 25 additions & 8 deletions accessibility-checker-extension/src/ts/options/OptionsApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ import {

import "./option.scss";
import { getDevtoolsController } from "../devtools/devtoolsController";
import { Theme } from "@carbon/react";
import { BrowserDetection } from "../util/browserDetection";

interface OptionsAppState {
lastSettings?: ISettings
Expand Down Expand Up @@ -453,7 +455,9 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
/>
</>}

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
aria-label="Version information"
modalHeading="Selecting a rule set deployment date"
passiveModal={true}
Expand All @@ -472,9 +476,13 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {

<p style={{ maxWidth: "100%" }}><strong>Rule sets</strong>: A packaged set for a guideline, each of which is a collection of rules mapped to the requirements in the accessibility guideline,
see the <Link inline={true} size="md" className="link" href="https://www.ibm.com/able/requirements/checker-rule-sets" target="_blank" style={{ color: '#002D9C' }}>Checker rule sets</Link>.</p>
</Modal>, document.body)}
</Modal>
</Theme>
, document.body)}

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
modalHeading="Stored scans"
size='sm'
primaryButtonText="Change deployment dates"
Expand All @@ -491,7 +499,9 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
}
>
<p>Changing the rule set deployment dates will delete any currently stored scans.</p>
</Modal>, document.body)}
</Modal>
</Theme>
, document.body)}

</div>
{/**** Select ruleset / policy */}
Expand Down Expand Up @@ -535,7 +545,9 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
/>
</>}

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
aria-label="Guidelines information"
modalHeading="Selecting an accessibility guideline"
passiveModal={true}
Expand All @@ -551,10 +563,14 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
<p style={{ maxWidth: "100%" }}><strong>WCAG 2.0 (A, AA)</strong>: Referenced by US Section 508, but not the latest W3C specification.</p>
<p style={{ maxWidth: "100%" }}><strong>Rule sets</strong>: A packaged set for a guideline, each of which is a collection of rules mapped to requirements in the accessibility guideline,
see the <Link inline={true} size="md" className="link" href="https://www.ibm.com/able/requirements/checker-rule-sets" target="_blank" style={{ color: '#002D9C' }}>Checker rule sets</Link>.</p>
</Modal>, document.body)}
</Modal>
</Theme>
, document.body)}
</div>

{typeof document === 'undefined' ? null : ReactDOM.createPortal(<Modal
{typeof document === 'undefined' ? null : ReactDOM.createPortal(
<Theme theme={BrowserDetection.isDarkMode()?"g100":"white"}>
<Modal
modalHeading="Stored scans"
primaryButtonText="Change Guidelines"
secondaryButtonText="Cancel"
Expand All @@ -570,7 +586,8 @@ export class OptionsApp extends React.Component<{}, OptionsAppState> {
}
>
<p>Changing the rule set deployment dates will delete any currently stored scans.</p>
</Modal>, document.body)}
</Modal>
</Theme>, document.body)}


<h2>Keyboard checker mode</h2>
Expand Down
Loading