Skip to content

Commit

Permalink
chore(repo): Update main-4.x for Jan release (#2148)
Browse files Browse the repository at this point in the history
* Bump path-to-regexp and express in /rule-server (#2128)

Bumps [path-to-regexp](https://github.com/pillarjs/path-to-regexp) to 0.1.12 and updates ancestor dependency [express](https://github.com/expressjs/express). These dependencies need to be updated together.


Updates `path-to-regexp` from 0.1.10 to 0.1.12
- [Release notes](https://github.com/pillarjs/path-to-regexp/releases)
- [Changelog](https://github.com/pillarjs/path-to-regexp/blob/master/History.md)
- [Commits](pillarjs/path-to-regexp@v0.1.10...v0.1.12)

Updates `express` from 4.21.0 to 4.21.2
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.2/History.md)
- [Commits](expressjs/express@4.21.0...4.21.2)

---
updated-dependencies:
- dependency-name: path-to-regexp
  dependency-type: indirect
- dependency-name: express
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Brunet <[email protected]>

* fix dark mode react portal pop-up (#2138)

* fix(extension):Fix reset filter link #1877 (#2136)

* reset filter fix

* css fix

---------

Co-authored-by: Tom Brunet <[email protected]>

* fix(extension): Don't show full data:text/html content on generated HTML report page  (#2140)

* truncating url

* remove unused import

* Adjust tooltip location

---------

Co-authored-by: Tom Brunet <[email protected]>

* chore(extension): carbon package update and use new carbon combobutton #1842 (#2137)

* carbon package update and use new carbon combobutton

* alignment fix

---------

Co-authored-by: Tom Brunet <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Namrata Singh <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2025
1 parent a66e96e commit 981a467
Show file tree
Hide file tree
Showing 9 changed files with 707 additions and 304 deletions.
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

0 comments on commit 981a467

Please sign in to comment.