Skip to content

Commit

Permalink
fix(masthead): update logo url protocol (#9914)
Browse files Browse the repository at this point in the history
### Related Ticket(s)

#9567 

### Description

This updates the React masthead logo URL to use `https`.

### Changelog

**Changed**

- React masthead logo URL changed to use `https`

<!-- React and Web Component deploy previews are enabled by default. -->
<!-- To enable additional available deploy previews, apply the following -->
<!-- labels for the corresponding package: -->
<!-- *** "test: e2e": Codesandbox examples and e2e integration tests -->
<!-- *** "package: services": Services -->
<!-- *** "package: utilities": Utilities -->
<!-- *** "RTL": React / Web Components (RTL) -->
<!-- *** "feature flag": React / Web Components (experimental) -->
  • Loading branch information
kennylam authored Jan 17, 2023
1 parent 0fd85a2 commit ece8c04
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 50 deletions.
32 changes: 13 additions & 19 deletions packages/carbon-web-components/src/components/dropdown/dropdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class BXDropdown extends ValidityMixin(
this.querySelectorAll(
(this.constructor as typeof BXDropdown).selectorItemSelected
),
item => {
(item) => {
(item as BXDropdownItem).selected = false;
}
);
Expand Down Expand Up @@ -312,7 +312,7 @@ class BXDropdown extends ValidityMixin(
this.querySelectorAll(
(this.constructor as typeof BXDropdown).selectorItemHighlighted
),
item => {
(item) => {
(item as BXDropdownItem).highlighted = false;
}
);
Expand All @@ -331,7 +331,7 @@ class BXDropdown extends ValidityMixin(
this.querySelectorAll(
(this.constructor as typeof BXDropdown).selectorItem
),
item => {
(item) => {
(item as BXDropdownItem).highlighted = false;
}
);
Expand Down Expand Up @@ -537,20 +537,20 @@ class BXDropdown extends ValidityMixin(
shouldUpdate(changedProperties) {
const { selectorItem } = this.constructor as typeof BXDropdown;
if (changedProperties.has('size')) {
forEach(this.querySelectorAll(selectorItem), elem => {
forEach(this.querySelectorAll(selectorItem), (elem) => {
(elem as BXDropdownItem).size = this.size;
});
}
if (changedProperties.has('value')) {
// `<bx-multi-select>` updates selection beforehand
// because our rendering logic for `<bx-multi-select>` looks for selected items via `qSA()`
forEach(this.querySelectorAll(selectorItem), elem => {
forEach(this.querySelectorAll(selectorItem), (elem) => {
(elem as BXDropdownItem).selected =
(elem as BXDropdownItem).value === this.value;
});
const item = find(
this.querySelectorAll(selectorItem),
elem => (elem as BXDropdownItem).value === this.value
(elem) => (elem as BXDropdownItem).value === this.value
);
if (item) {
const range = this.ownerDocument!.createRange();
Expand All @@ -570,7 +570,7 @@ class BXDropdown extends ValidityMixin(
if (changedProperties.has('disabled')) {
const { disabled } = this;
// Propagate `disabled` attribute to descendants until `:host-context()` gets supported in all major browsers
forEach(this.querySelectorAll(selectorItem), elem => {
forEach(this.querySelectorAll(selectorItem), (elem) => {
(elem as BXDropdownItem).disabled = disabled;
});
}
Expand Down Expand Up @@ -651,8 +651,7 @@ class BXDropdown extends ValidityMixin(
<div
part="helper-text"
class="${helperClasses}"
?hidden="${inline || !hasHelperText}"
>
?hidden="${inline || !hasHelperText}">
<slot name="helper-text" @slotchange="${handleSlotchangeHelperText}"
>${helperText}</slot
>
Expand All @@ -677,17 +676,15 @@ class BXDropdown extends ValidityMixin(
part="menu-body"
class="${prefix}--list-box__menu"
role="listbox"
tabindex="-1"
>
tabindex="-1">
<slot></slot>
</div>
`;
return html`
<label
part="label-text"
class="${labelClasses}"
?hidden="${!hasLabelText}"
>
?hidden="${!hasLabelText}">
<slot name="label-text" @slotchange="${handleSlotchangeLabelText}"
>${labelText}</slot
>
Expand All @@ -698,8 +695,7 @@ class BXDropdown extends ValidityMixin(
?data-invalid=${invalid}
@click=${handleClickInner}
@keydown=${handleKeydownInner}
@keypress=${handleKeypressInner}
>
@keypress=${handleKeypressInner}>
${validityIcon}
<div
part="trigger-button"
Expand All @@ -710,8 +706,7 @@ class BXDropdown extends ValidityMixin(
aria-expanded="${String(open)}"
aria-haspopup="listbox"
aria-owns="menu-body"
aria-controls="menu-body"
>
aria-controls="menu-body">
${this._renderPrecedingTriggerContent()}${this._renderTriggerContent()}${this._renderFollowingTriggerContent()}
<div class="${iconContainerClasses}">
${ChevronDown16({ 'aria-label': toggleLabel })}
Expand All @@ -724,8 +719,7 @@ class BXDropdown extends ValidityMixin(
class="${prefix}--assistive-text"
role="status"
aria-live="assertive"
aria-relevant="additions text"
>
aria-relevant="additions text">
${assistiveStatusText}
</div>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ class BXSelectableTile extends FocusMixin(LitElement) {
name="${ifNonNull(name)}"
value="${ifNonNull(value)}"
.checked=${selected}
@change=${handleChange}
/>
@change=${handleChange} />
<label for="input" class="${classes}" tabindex="0">
<div class="${prefix}--tile__checkmark">
${CheckmarkFilled16({
Expand Down
10 changes: 6 additions & 4 deletions packages/carbon-web-components/src/components/tooltip/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ const { prefix } = settings;
* @element bx-tooltip
*/
@customElement(`${prefix}-tooltip`)
class BXTooltip extends HostListenerMixin(LitElement)
implements BXFloatingMenuTrigger {
class BXTooltip
extends HostListenerMixin(LitElement)
implements BXFloatingMenuTrigger
{
/**
* The menu body.
*/
Expand Down Expand Up @@ -67,7 +69,7 @@ class BXTooltip extends HostListenerMixin(LitElement)
*/
@HostListener('keydown')
// @ts-ignore: The decorator refers to this method but TS thinks this method is not referred to
private _handleKeydown = async event => {
private _handleKeydown = async (event) => {
if ([' ', 'Enter'].includes(event.key)) {
this._handleClick();
} else if (event.key === 'Escape') {
Expand Down Expand Up @@ -126,7 +128,7 @@ class BXTooltip extends HostListenerMixin(LitElement)
if (!this._menuBody) {
this._menuBody = find(
this.childNodes,
elem => (elem.constructor as typeof BXFloatingMenu).FLOATING_MENU
(elem) => (elem.constructor as typeof BXFloatingMenu).FLOATING_MENU
);
}
if (this._menuBody) {
Expand Down
30 changes: 15 additions & 15 deletions packages/react/src/__tests__/__snapshots__/storyshots.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -36306,7 +36306,7 @@ exports[`Storyshots Components/Dotcom shell Default (footer language only) 1`] =
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -43341,7 +43341,7 @@ exports[`Storyshots Components/Dotcom shell Default 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -49402,7 +49402,7 @@ exports[`Storyshots Components/Dotcom shell Search open 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -59657,7 +59657,7 @@ exports[`Storyshots Components/Dotcom shell With L1 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-eco__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -66747,7 +66747,7 @@ exports[`Storyshots Components/Dotcom shell With micro footer (language only) 1`
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -72709,7 +72709,7 @@ exports[`Storyshots Components/Dotcom shell With micro footer 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -78379,7 +78379,7 @@ exports[`Storyshots Components/Dotcom shell With platform 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-eco__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -84617,7 +84617,7 @@ exports[`Storyshots Components/Dotcom shell With short footer (language only) 1`
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -91651,7 +91651,7 @@ exports[`Storyshots Components/Dotcom shell With short footer 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -115298,7 +115298,7 @@ exports[`Storyshots Components/Masthead Default 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -115976,7 +115976,7 @@ exports[`Storyshots Components/Masthead Search open onload 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -120865,7 +120865,7 @@ exports[`Storyshots Components/Masthead With L1 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-eco__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -122522,7 +122522,7 @@ exports[`Storyshots Components/Masthead With alternate logo and tooltip 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -127245,7 +127245,7 @@ exports[`Storyshots Components/Masthead With custom navigation 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-default__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down Expand Up @@ -128822,7 +128822,7 @@ exports[`Storyshots Components/Masthead With platform 1`] = `
<a
aria-label="IBM®"
data-autoid="dds--masthead-eco__l0-logo"
href="http://www.ibm.com"
href="https://www.ibm.com"
>
<MastheadLogo
height="23"
Expand Down
6 changes: 2 additions & 4 deletions packages/react/src/components/ButtonGroup/ButtonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ const ButtonGroup = ({ buttons }) => {
<ol
className={`${prefix}--buttongroup`}
data-autoid={`${stablePrefix}--button-group`}
ref={groupRef}
>
ref={groupRef}>
{buttons.map((button, key) => {
return (
<li key={key} className={`${prefix}--buttongroup-item`}>
Expand All @@ -42,8 +41,7 @@ const ButtonGroup = ({ buttons }) => {
isExpressive
{...button}
type="button"
kind={key === 0 ? 'primary' : 'tertiary'}
>
kind={key === 0 ? 'primary' : 'tertiary'}>
{button.copy}
</Button>
</li>
Expand Down
7 changes: 5 additions & 2 deletions packages/react/src/components/Icon/IbmLogo.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright IBM Corp. 2016, 2022
* Copyright IBM Corp. 2016, 2023
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
Expand Down Expand Up @@ -43,7 +43,10 @@ const IbmLogo = ({ autoid, logoData, isSearchActive }) => {
dangerouslySetInnerHTML={{ __html: logoData.svg }}
/>
) : (
<a aria-label="IBM®" data-autoid={autoid} href={`http://www.ibm.com`}>
<a
aria-label="IBM®"
data-autoid={autoid}
href={`https://www.ibm.com`}>
{!useAlternateLogo && <MastheadLogo />}
</a>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class DDSButtonGroup extends StableSelectorMixin(LitElement) {
private _handleSlotChange(event: Event) {
const childItems = (event.target as HTMLSlotElement)
.assignedNodes()
.filter(elem =>
.filter((elem) =>
(elem as HTMLElement).matches !== undefined
? (elem as HTMLElement).matches(
(this.constructor as typeof DDSButtonGroup).selectorItem
Expand Down Expand Up @@ -64,9 +64,7 @@ class DDSButtonGroup extends StableSelectorMixin(LitElement) {
}

render() {
return html`
<slot @slotchange="${this._handleSlotChange}"></slot>
`;
return html` <slot @slotchange="${this._handleSlotChange}"></slot> `;
}

connectedCallback() {
Expand Down

0 comments on commit ece8c04

Please sign in to comment.