Skip to content

Commit

Permalink
More spelling fixes (#1026)
Browse files Browse the repository at this point in the history
* chore: more spelling fixes

* chore: remove some no-longer-used bits of PageHeader tests

* chore: fix the example projects

* chore: restore spelling of filesize attribute
  • Loading branch information
dcwarwick authored Jul 19, 2021
1 parent fe37665 commit 03b4c74
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// cspell:words TTFB

const reportWebVitals = (onPerfEntry) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// cspell:words TTFB

const reportWebVitals = (onPerfEntry) => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
Expand Down
6 changes: 5 additions & 1 deletion packages/cloud-cognitive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
# cSpell:ignore wibble
---

# Change Log

All notable changes to this project will be documented in this file.
Expand Down Expand Up @@ -1096,7 +1100,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline

### Bug Fixes

* forgot to add onclose to export modal ([#776](https://github.com/carbon-design-system/ibm-cloud-cognitive/issues/776)) ([c381d93](https://github.com/carbon-design-system/ibm-cloud-cognitive/commit/c381d93e123c33a600e7bf8dee0f3fd8c75767e6))
* forgot to add onClose to export modal ([#776](https://github.com/carbon-design-system/ibm-cloud-cognitive/issues/776)) ([c381d93](https://github.com/carbon-design-system/ibm-cloud-cognitive/commit/c381d93e123c33a600e7bf8dee0f3fd8c75767e6))



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

$story-class: 'create-full-page-stories';

// cspell:disable-next-line
.sbdocs .#{$story-class}__viewport {
// max-height: 500px;
height: 100vh;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export let ImportModal = forwardRef(
status: 'edit',
iconDescription: invalidIconDescription,
name: file.name,
filesize: file.size,
fileSize: file.size,
invalidFileType: file.invalidFileType,
fileData: file,
fetchError: file.fetchError,
Expand All @@ -90,7 +90,7 @@ export let ImportModal = forwardRef(
newFile.errorSubject =
invalidFileTypeErrorHeader || defaultErrorHeader;
newFile.invalid = true;
} else if (maxFileSize && newFile.filesize > maxFileSize) {
} else if (maxFileSize && newFile.fileSize > maxFileSize) {
newFile.errorBody = maxFileSizeErrorBody || defaultErrorBody;
newFile.errorSubject = maxFileSizeErrorHeader || defaultErrorHeader;
newFile.invalid = true;
Expand Down Expand Up @@ -216,7 +216,7 @@ export let ImportModal = forwardRef(
invalid={file.invalid}
errorBody={file.errorBody}
errorSubject={file.errorSubject}
filesize={file.filesize}
filesize={file.fileSize /* cspell:disable-line */}
/>
))}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ export let LoadingBar = React.forwardRef(
const prevActive = usePrevious(active);

const isDeterminate = percentage !== undefined;
const percProgress = isDeterminate
const percentProgress = isDeterminate
? percentage > 100
? `100%`
: percentage + '%'
: 0;
const showPercIndicator = isDeterminate && showPercentageIndicator;
const actuallyShowPercentageIndicator =
isDeterminate && showPercentageIndicator;
// switch classes dependant on props
const loadingWrapper = cx({
[`${blockClass}__preload`]: !prevActive && !active,
Expand Down Expand Up @@ -107,12 +108,12 @@ export let LoadingBar = React.forwardRef(
id={loadingId}>
<div className={loadingClassName}>
<div
{...(isDeterminate && { style: { width: percProgress } })}
{...(isDeterminate && { style: { width: percentProgress } })}
className={`${blockClass}__progress`}>
<div className={animationClassName} />
</div>
</div>
{showPercIndicator && (
{actuallyShowPercentageIndicator && (
<div className={`${blockClass}__indicator-wrapper`}>
<div className={`${blockClass}__indicator`}>
{active && percentageIndicatorText}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ $loading-bar__small-height: 4px;
}
}

@keyframes loadingbar-stop {
@keyframes loading-bar-stop {
0% {
opacity: 1;
}
Expand Down Expand Up @@ -173,7 +173,7 @@ $loading-bar__small-height: 4px;

.#{$block-class}__indefinite-stop {
// stylelint-disable-next-line carbon/motion-token-use
animation: 1800ms ease-in-out loadingbar-stop forwards;
animation: 1800ms ease-in-out loading-bar-stop forwards;
}

.#{$block-class}__stop-progress:before {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Story, ArgsTable, Source, Canvas } from '@storybook/addon-docs';
import { pkg } from '../../settings';
import { getStorybookSlug } from '../../../config';
import { PageHeader } from '.';
// cspell:ignore actionbar breadcrumbitems pageactions summarydetails

# PageHeader

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,16 +241,13 @@ describe('PageHeader', () => {
expect(
document.querySelectorAll('span.page-header-test--available-space')
).toHaveLength(0);
expect(screen.queryAllByTestId('breadcrumbitem')).toHaveLength(0);
expect(screen.queryAllByTestId('tabs')).toHaveLength(0);
expect(
document.querySelectorAll(`.${blockClass}__page-actions`)
).toHaveLength(0);
expect(document.querySelectorAll(`.${blockClass}__subtitle`)).toHaveLength(
0
);
expect(screen.queryByText(subtitle)).toBeNull();
expect(screen.queryAllByTestId('tags')).toHaveLength(0);
expect(document.querySelectorAll(`.${blockClass}__title`)).toHaveLength(0);
expect(screen.queryByText(titleObj.text)).toBeNull();
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

$story-class: 'page-header-stories';

// cspell:disable-next-line
.sbdocs .#{$story-class}__viewport {
max-height: 500px;
background-color: $ui-background;
Expand Down

0 comments on commit 03b4c74

Please sign in to comment.