This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Example usage: | |
* const hotspots = findAllDeep(element, `[slot*="hotspot"]`, 10); | |
*/ | |
const findAllDeep = (parent, selectors, depth = null) => { | |
let nodes = new Set(); | |
let currentDepth = 1; | |
const recordResult = (nodesArray) => { | |
for (const node of nodesArray) { | |
nodes.add(node) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { html, fixture, expect, fixtureCleanup, aTimeout } from '@open-wc/testing/index-no-side-effects.js'; | |
import '@open-wc/testing/register-chai-plugins.js'; | |
import { visualDiff } from '@web/test-runner-visual-regression'; | |
import { setViewport } from '@web/test-runner-commands'; | |
import type { RhptMyTrialsApp } from '../src/rhpt-my-trials-app.js'; | |
import { globalMachine } from '../src/machines/globalMachine.js'; | |
import { initializerMachine } from '../src/machines/initializerMachine.js'; | |
import '../src/rhpt-my-trials-app.js'; | |
import { trials } from '../src/machines/mocks/trials.js'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/* Via pfe-base.css */ | |
:is(rh-footer, rh-global-footer) a { | |
color: var(--rh-color-link-inline-on-dark, var(--rh-color-blue-200, #73bcf7)); | |
text-decoration: none; | |
} | |
:is(rh-footer, rh-global-footer) a:hover { | |
color: var(--rh-color-link-inline-hover-on-dark, var(--rh-color-blue-100, #bee1f4)); | |
text-decoration: underline; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<link href="/rhds-lightdom.css" rel="stylesheet"> | |
</head> | |
<body> | |
<rh-global-footer> | |
<h3 slot="links-primary" data-analytics-text="Red Hat legal and privacy links" hidden>Red Hat legal and privacy links</h3> | |
<ul slot="links-primary" data-analytics-region="page-footer-bottom-primary"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query ($issue_id: ID!) { | |
node(id: $issue_id) { | |
__typename | |
... on Issue { | |
id | |
title | |
number | |
projectV2(number: 1) { | |
id | |
items(first: 100) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as C from '@lit-labs/context'; | |
class S<T extends C.ContextKey<unknown, unknown>> { | |
constructor( | |
public host: HTMLElement, | |
public context: T, | |
public provider: C.ContextType<T>, | |
) {} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 🚚 Installation | |
```sh | |
npm i @rhds/tokens | |
``` | |
## 🎭 Usage | |
We use [style-dictionary](https://amzn.github.io/style-dictionary/) to transform our tokens into multiple formats and helpers. | |
### Stylelint Plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @ts-check | |
/** | |
* Countdown timer as an observable. | |
* | |
* @param {number} timeout - Specified time to resolve the countdown specified in seconds. | |
* @param {?(number) => void} callback - Callback that updates on countdown change. | |
* @returns {{ cancel?: (string) => void, promise: Promise<void>}} | |
*/ | |
export function countdown(timeout, callback = null) { | |
const ret = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chris Coyer's Vid | |
https://twitter.com/chriscoyier/status/1588241068331786240 | |
Adam A's vids | |
https://twitter.com/argyleink/status/1588255406375153665 | |
https://twitter.com/ChromiumDev/status/1582786176917774337 |
NewerOlder