Skip to content

Commit

Permalink
WRR-10797: Fixed typos and grammar errors (#1758)
Browse files Browse the repository at this point in the history
* fixed unsafe urls, deprecated functions and incorrect JSDocs

* fixed grammar errors

* Fixed typos in sandstone code

* Update samples/qa-a11y/src/components/Section.js

Co-authored-by: Stanca <63341832+stanca-pop-lgp@users.noreply.github.com>

* reverted removal of subtraction

* reverted change of URLs

* revert unsafe url

* reverted jsdoc issues

* reverted jsdoc issues

* reverted deprecated functions

---------

Co-authored-by: Stanca <63341832+stanca-pop-lgp@users.noreply.github.com>
  • Loading branch information
daniel-stoian-lgp and stanca-pop-lgp authored Dec 16, 2024
1 parent 6227c36 commit 248ca04
Show file tree
Hide file tree
Showing 84 changed files with 197 additions and 197 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ No significant changes.

### Fixed

- `sandstone/Dropdown' to focus properly the first option and the last option via page up and page down
- `sandstone/Dropdown` to focus properly the first option and the last option via page up and page down
- `sandstone/QuickGuidePanels` to not lose focus when the last view is displayed

## [2.7.5] - 2023-08-04
Expand Down
2 changes: 1 addition & 1 deletion Checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const CheckboxBase = kind({

computed: {
className: ({indeterminate, selected, standalone, styler}) => styler.append({selected, standalone, indeterminate}),
children: ({indeterminate, indeterminateIcon, children}) => (indeterminate ? indeterminateIcon : children) // This controls which icon to use, an not that icon's visual presence.
children: ({indeterminate, indeterminateIcon, children}) => (indeterminate ? indeterminateIcon : children) // This controls which icon to use, and not that icon's visual presence.
},

render: ({children, css, disabled, selected, ...rest}) => {
Expand Down
2 changes: 1 addition & 1 deletion Checkbox/Checkbox.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
line-height: 0;

.icon {
margin: 0; // Needed to apply here insetad of on `.checkbox` due to .icon.size precedence :(
margin: 0; // Needed to apply here instead of on `.checkbox` due to .icon.size precedence :(
border-radius: @sand-checkbox-border-radius;
position: relative;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion ContextualMenuDecorator/ContextualMenuDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ScrollingRepeater = ({className, ...rest}) => (
);

const ContextualMenuDecoratorBase = hoc(defaultConfig, (config, Wrapped) => {
// we might not need Skinnable at all here. If we want to skin the popup and it's defined as a
// we might not need Skinnable at all here. If we want to skin the popup, and it's defined as a
// private component in this module, we can wrap it with skinnable and style it as needed there.
const Component = Skinnable(
ContextualPopupDecorator(
Expand Down
4 changes: 2 additions & 2 deletions ContextualPopupDecorator/ContextualPopupDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ const Decorator = hoc(defaultConfig, (config, Wrapped) => {
snapshot.shouldSpotActivator = (
// isn't set
!current ||
// is on the activator and we want to re-spot it so a11y read out can occur
// is on the activator, and we want to re-spot it so a11y read out can occur
current === prevState.activator ||
// is within the popup
this.containerNode.contains(current)
Expand Down Expand Up @@ -358,7 +358,7 @@ const Decorator = hoc(defaultConfig, (config, Wrapped) => {
}

generateId = () => {
return Math.random().toString(36).substr(2, 8);
return Math.random().toString(36).substring(2, 10);
};

getContainerNodeWidth () {
Expand Down
2 changes: 1 addition & 1 deletion DayPicker/DayPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const DayPickerBase = kind({
disabled: PropTypes.bool,

/**
* Called when an day is selected or unselected.
* Called when a day is selected or unselected.
*
* The event payload will be an object with the following members:
* * `selected` - An array of numbers representing the selected days, 0 indexed where Sunday
Expand Down
2 changes: 1 addition & 1 deletion DayPicker/DaySelectorDecorator.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const DaySelectorDecorator = hoc((config, Wrapped) => {
locale: PropTypes.string,

/**
* Called when an day is selected or unselected.
* Called when a day is selected or unselected.
*
* The event payload will be an object with the following members:
* * `selected` - An array of numbers representing the selected days, 0 indexed
Expand Down
2 changes: 1 addition & 1 deletion DayPicker/tests/DayPicker-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('DayPicker', () => {
// We need to change the locale to firstDayOfWeek !== 0.
// If firstDayOfWeek === 0, the number type check conditional statement
// is skipped due to the fast execution path of localizeSelected(), which
// reduces code coverage..
// reduces code coverage.
ilib.setLocale('es-ES');

render(<DayPicker locale="es-ES" selected={1} />);
Expand Down
2 changes: 1 addition & 1 deletion FlexiblePopupPanels/FlexiblePopupPanels.module.less
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
box-sizing: border-box;
}

&.auto { /* Availble for export */ }
&.auto { /* Available for export */ }

// These calculations are here (rather than the variables file) because they're
// implementation-specific rather than being generally useful due to the container
Expand Down
4 changes: 2 additions & 2 deletions IconItem/IconItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const IconItemBase = kind({
bordered: PropTypes.bool,

/**
* The custom component rendred as the content of this IconItem.
* The custom component rendered as the content of this IconItem.
*
* @type {Component}
* @public
Expand Down Expand Up @@ -152,7 +152,7 @@ const IconItemBase = kind({

/**
* Source and size for the image.
* See the datails in {@link sandstone/IconItem.ImageShape|ImageShape}
* See the details in {@link sandstone/IconItem.ImageShape|ImageShape}
*
* @type {sandstone/IconItem.ImageShape}
* @public
Expand Down
2 changes: 1 addition & 1 deletion Input/InputField.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import componentCss from './InputField.module.less';
/**
* A Sandstone styled input component.
*
* It supports start and end icons but it does not support Spotlight. Apps should use
* It supports start and end icons, but it does not support Spotlight. Apps should use
* {@link sandstone/Input.InputField}.
*
* @class InputFieldBase
Expand Down
2 changes: 1 addition & 1 deletion Input/Keypad.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const Keypad = kind({
}
});

// Setup a keypress handler for window that monitors each of the number keys and the backspace key
// Set up a keypress handler for window that monitors each of the number keys and the backspace key
const handleWindowKeyPress = handle(
oneOf(
[forKey('number'), forward('onAdd')],
Expand Down
6 changes: 3 additions & 3 deletions MediaPlayer/MediaControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const MediaControlsBase = kind({
actionGuideLabel: PropTypes.string,

/**
* These components are placed below the action guide. Typically these will be media playlist controls.
* These components are placed below the action guide. Typically, these will be media playlist controls.
*
* @type {Node}
* @public
Expand Down Expand Up @@ -446,7 +446,7 @@ const MediaControlsDecorator = hoc((config, Wrapped) => {
actionGuideLabel: PropTypes.string,

/**
* These components are placed below the children. Typically these will be media playlist items.
* These components are placed below the children. Typically, these will be media playlist items.
*
* @type {Node}
* @public
Expand Down Expand Up @@ -568,7 +568,7 @@ const MediaControlsDecorator = hoc((config, Wrapped) => {
playPauseButtonDisabled: PropTypes.bool,

/**
* Disables the media playback-rate control via rewind and fast forward keys
* Disables the media playback-rate control via rewind and fast-forward keys
*
* @type {Boolean}
* @public
Expand Down
2 changes: 1 addition & 1 deletion MediaPlayer/Times.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const TimesBase = kind({
/**
* An instance of a Duration Formatter from i18n.
*
* Must has a `format()` method that returns a string.
* Must have a `format()` method that returns a string.
*
* @type {Object}
* @required
Expand Down
32 changes: 16 additions & 16 deletions PageViews/tests/PageViews-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ describe('PageViews Specs', () => {
() => {
render(
<PageViews index={0}>
<Page>I gots contents</Page>
<Page>I gots contents</Page>
<Page>I got contents</Page>
<Page>I got contents</Page>
</PageViews>
);

Expand All @@ -28,8 +28,8 @@ describe('PageViews Specs', () => {
() => {
render(
<PageViews pageIndicatorType="number" index={0}>
<Page>I gots contents</Page>
<Page>I gots contents</Page>
<Page>I got contents</Page>
<Page>I got contents</Page>
</PageViews>
);

Expand All @@ -46,8 +46,8 @@ describe('PageViews Specs', () => {
() => {
render(
<PageViews index={1}>
<Page>I gots contents</Page>
<Page>I gots contents</Page>
<Page>I got contents</Page>
<Page>I got contents</Page>
</PageViews>
);

Expand All @@ -64,8 +64,8 @@ describe('PageViews Specs', () => {
() => {
render(
<PageViews pageIndicatorType="number" index={1}>
<Page>I gots contents</Page>
<Page>I gots contents</Page>
<Page>I got contents</Page>
<Page>I got contents</Page>
</PageViews>
);

Expand All @@ -84,8 +84,8 @@ describe('PageViews Specs', () => {
let index = 0;
const {rerender} = render(
<PageViews index={index} onTransition={spy} noAnimation>
<Page>I gots contents</Page>
<Page>I gots contents2</Page>
<Page>I got contents</Page>
<Page>I got contents2</Page>
</PageViews>
);

Expand All @@ -94,8 +94,8 @@ describe('PageViews Specs', () => {

rerender(
<PageViews index={index} onTransition={spy} noAnimation>
<Page>I gots contents</Page>
<Page>I gots contents2</Page>
<Page>I got contents</Page>
<Page>I got contents2</Page>
</PageViews>
);

Expand All @@ -115,8 +115,8 @@ describe('PageViews Specs', () => {
let index = 0;
const {rerender} = render(
<PageViews index={index} onWillTransition={spy} noAnimation>
<Page>I gots contents</Page>
<Page>I gots contents2</Page>
<Page>I got contents</Page>
<Page>I got contents2</Page>
</PageViews>
);

Expand All @@ -125,8 +125,8 @@ describe('PageViews Specs', () => {

rerender(
<PageViews index={index} onWillTransition={spy} noAnimation>
<Page>I gots contents</Page>
<Page>I gots contents2</Page>
<Page>I got contents</Page>
<Page>I got contents2</Page>
</PageViews>
);

Expand Down
2 changes: 1 addition & 1 deletion Picker/Picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ const PickerBase = kind({

/**
* Allows picker to continue from the start of the list after it reaches the end and
* vice-versa.
* vice versa.
*
* @type {Boolean}
* @public
Expand Down
6 changes: 3 additions & 3 deletions Popup/Popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ class Popup extends Component {

/**
* Indicates that the popup will not trigger `onClose` when the user presses the cancel/back (e.g. `ESC`) key or
* taps outside of the popup.
* taps outside the popup.
*
* @type {Boolean}
* @default false
Expand Down Expand Up @@ -616,7 +616,7 @@ class Popup extends Component {

off('keydown', this.handleKeyDown);

// if there is no currently-spotted control or it is wrapped by the popup's container, we
// if there is no currently-spotted control, or it is wrapped by the popup's container, we
// know it's safe to change focus
if (!current || (containerNode && containerNode.contains(current))) {
// attempt to set focus to the activator, if available
Expand Down Expand Up @@ -647,7 +647,7 @@ class Popup extends Component {
if (!Spotlight.isPaused() && !Spotlight.focus(containerId)) {
const current = Spotlight.getCurrent();

// In cases where the container contains no spottable controls or we're in pointer-mode, focus
// In cases where the container contains no spottable controls, or we're in pointer-mode, focus
// cannot inherently set the active container or blur the active control, so we must do that
// here.
if (current) {
Expand Down
4 changes: 2 additions & 2 deletions PopupTabLayout/PopupTabLayout.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Popup from '../Popup';

import componentCss from './PopupTabLayout.module.less';

// List all of the props from PopupTabLayout that we want to move from this component's root onto PopupTabLayout.
// List all the props from PopupTabLayout that we want to move from this component's root onto PopupTabLayout.
const popupPropList = ['noAutoDismiss', 'onHide', 'onKeyDown', 'onShow', 'open',
'position', 'scrimType', 'spotlightId', 'spotlightRestrict', 'id', 'className',
'style', 'noAnimation', 'onClose'];
Expand Down Expand Up @@ -78,7 +78,7 @@ const PopupTabLayoutBase = kind({
/**
* Specify dimensions for the layout areas.
*
* All 4 combinations must me supplied: each of the elements, tabs and content in both
* All 4 combinations must be supplied: each of the elements, tabs and content in both
* collapsed and expanded state.
*
* @type {{tabs: {collapsed: Number, normal: Number}, content: {expanded: number, normal: number}}}
Expand Down
2 changes: 1 addition & 1 deletion QuickGuidePanels/QuickGuidePanels.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Steps from '../Steps';
import css from './QuickGuidePanels.module.less';

/**
* A QuickGuidePaenls that has steps with corresponding panels and panels have full screen size content.
* A QuickGuidePanels that has steps with corresponding panels and panels have full screen size content.
*
* @example
* <QuickGuidePanels>
Expand Down
Loading

0 comments on commit 248ca04

Please sign in to comment.