Skip to content

Commit

Permalink
fix(site): fix prettier causing whitespace issues
Browse files Browse the repository at this point in the history
  • Loading branch information
brentswisher committed Jul 5, 2024
1 parent 5056ac1 commit 2c51ada
Show file tree
Hide file tree
Showing 20 changed files with 350 additions and 330 deletions.
22 changes: 10 additions & 12 deletions packages/pharos-site/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,20 @@
- Add register utility to simplify component registration and ensure trivial classes are used for custom elements:

```javascript
import { PharosAlert, PharosButton, PharosIcon } from "@ithaka/pharos";
import registerComponents from "@ithaka/pharos/lib/utils/registerComponents";
import { PharosAlert, PharosButton, PharosIcon } from '@ithaka/pharos';
import registerComponents from '@ithaka/pharos/lib/utils/registerComponents';

registerComponents("{prefix}", [PharosAlert, PharosButton, PharosIcon]);
registerComponents('{prefix}', [PharosAlert, PharosButton, PharosIcon]);
```

- Add a React Pharos context provider for consumers to indicate prefix used for registration:

```jsx
import { PharosContext } from "@ithaka/pharos/lib/utils/PharosContext";
import { PharosContext } from '@ithaka/pharos/lib/utils/PharosContext';
const context = { prefix: "homepage" };
const context = { prefix: 'homepage' };
<PharosContext.Provider value={context}>
...app code
</PharosContext.Provider>;
<PharosContext.Provider value={context}>...app code</PharosContext.Provider>;
```

### Patch Changes
Expand Down Expand Up @@ -235,9 +233,9 @@
2. Register them with a custom tag in your app's entrypoint in the form of `{app/bundle}-pharos-{component}`:
```javascript
import { PharosAlert } from "@ithaka/pharos/lib/components/alert/pharos-alert";
import { PharosAlert } from '@ithaka/pharos/lib/components/alert/pharos-alert';
customElements.define("homepage-pharos-alert", PharosAlert);
customElements.define('homepage-pharos-alert', PharosAlert);
```
3. Update templates, queries, unit tests, and integration tests with the newly defined tag names.
Expand Down Expand Up @@ -274,8 +272,8 @@
6. Import the JSDOM patch in your Jest setup file if you use Jest for unit testing:

```javascript
import "@ithaka/pharos/lib/patches/jsdom";
import "your-pharos-component-registration-file";
import '@ithaka/pharos/lib/patches/jsdom';
import 'your-pharos-component-registration-file';
```

### Patch Changes
Expand Down
4 changes: 1 addition & 3 deletions packages/pharos-site/src/pages/brand-expressions/imagery.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ import Grid from '../../components/Grid';
}}
>
Also, consider the{' '}
<PharosLink href="/brand-expressions/color" onClick={handleLinkClick}>
brand color palette
</PharosLink>{' '}
{/* <!--- pretiier-ignore-start --> */}<PharosLink href="/brand-expressions/color" onClick={handleLinkClick}>brand color palette</PharosLink>{' '}{/* <!--- pretiier-ignore-stop --> */}
when making selections.
</p>
</div>
Expand Down
130 changes: 60 additions & 70 deletions packages/pharos-site/src/pages/contributing/development/index.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import PageSection from '../../../components/statics/PageSection.tsx';

<PageSection title="Contributing development" isHeader></PageSection>
<>
<PageSection title="Contributing development" isHeader></PageSection>

<PageSection title="">
<p>
Pharos is a living design system that continues to expand with help from the community. We're
excited to work with contributors like you to further enrich the system. Discussions about
issues, bugs, and features for Pharos take place on GitHub. If you don't have a GitHub account,{' '}
<PharosLink href="https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F&source=header-home">
create one
</PharosLink>{' '}
{/* <!--- pretiier-ignore-start --> */}<PharosLink href="https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F&source=header-home">create one</PharosLink>{' '}{/* <!--- pretiier-ignore-stop --> */}
to join the community.
</p>
<p>You can contribute to Pharos in three ways:</p>
Expand All @@ -29,9 +28,7 @@ import PageSection from '../../../components/statics/PageSection.tsx';
<strong>Join a discussion:</strong> Community members can get involved with asking or helping
answer questions, sharing updates, and following along with potential decisions in the
project's{' '}
<PharosLink href="https://github.com/ithaka/pharos/discussions">
open communication forum
</PharosLink>{' '}
{/* <!--- pretiier-ignore-start --> */}<PharosLink href="https://github.com/ithaka/pharos/discussions">open communication forum</PharosLink>{' '}{/* <!--- pretiier-ignore-stop --> */}
on GitHub.
</li>
</ol>
Expand Down Expand Up @@ -60,66 +57,59 @@ import PageSection from '../../../components/statics/PageSection.tsx';
</PageSection>
</PageSection>

<PageSection title="The process">
<ol>
<li>
<strong>Open a GitHub issue:</strong>
<ol>
<li>
If so, please comment on the issue that you'd like to address it so that the maintainers
are aware of your intent and can assign you.
</li>
<li>
If not, create one using either the{' '}
<PharosLink href="https://github.com/ithaka/pharos/issues/new?assignees=&labels=feature+request&template=feature_request.md">
feature request
</PharosLink>{' '}
or{' '}
<PharosLink href="https://github.com/ithaka/pharos/issues/new?assignees=&labels=bug&template=bug_report.md">
bug report
</PharosLink>{' '}
template, depending on the type of contribution. Then assign yourself to it for
visibility.
</li>
</ol>
</li>
<li>
<strong>Make the change:</strong>
If you haven't already done so, clone the{' '}
<PharosLink href="https://github.com/ithaka/pharos">repo</PharosLink> and create a new branch
for your contribution. Review the
<PharosLink href="https://github.com/ithaka/pharos/blob/develop/docs/README.md">
development guidelines
</PharosLink>{' '}
to learn about contributing code to Pharos.
</li>
<li>
<strong>Open a pull request:</strong>
Follow the{' '}
<PharosLink href="https://github.com/ithaka/pharos/blob/develop/docs/development/conventions/pull-requests.md">
guidelines
</PharosLink>
, fill out the pull request template as best you can, and request a review from the{' '}
<i>Pharos maintainers</i> team.
</li>
<li>
<strong>Pass checks:</strong>
<ol>
<li>Lint - Analyzes your code for problematic patterns</li>
<li>Test - Runs browser tests and validates code coverage thresholds are met</li>
<li>
Chromatic (for Storybook and component related changes) - Takes snapshots of all stories
in Storybook and compares them against the baseline
</li>
<li>
Netlify preview (for site related changes) - Generates a preview build of the site for the
maintainers to review and provide feedback
</li>
</ol>
</li>
<li>
<strong>Await approval:</strong> Address feedback and get approval from development and
design. From here the maintainers will merge your changes and include it in the next release.
</li>
</ol>
</PageSection>
<PageSection title="The process">
<ol>
<li>
<strong>Open a GitHub issue:</strong>
<ol>
<li>
If so, please comment on the issue that you'd like to address it so that the maintainers
are aware of your intent and can assign you.
</li>
<li>
If not, create one using either the{' '}
{/* <!--- pretiier-ignore-start --> */}<PharosLink href="https://github.com/ithaka/pharos/issues/new?assignees=&labels=feature+request&template=feature_request.md">feature request</PharosLink>{' '}{/* <!--- pretiier-ignore-stop --> */}
or{' '}
{/* <!--- pretiier-ignore-start --> */}<PharosLink href="https://github.com/ithaka/pharos/issues/new?assignees=&labels=bug&template=bug_report.md">bug report</PharosLink>{' '}{/* <!--- pretiier-ignore-stop --> */}
template, depending on the type of contribution. Then assign yourself to it for
visibility.
</li>
</ol>
</li>
<li>
<strong>Make the change:</strong>
If you haven't already done so, clone the{' '}
<PharosLink href="https://github.com/ithaka/pharos">repo</PharosLink> and create a new branch
for your contribution. Review the
{/* <!--- pretiier-ignore-start --> */}<PharosLink href="https://github.com/ithaka/pharos/blob/develop/docs/README.md">development guidelines</PharosLink>{' '}{/* <!--- pretiier-ignore-stop --> */}
to learn about contributing code to Pharos.
</li>
<li>
<strong>Open a pull request:</strong>
Follow the{' '}
{/* <!--- pretiier-ignore-start --> */}<PharosLink href="https://github.com/ithaka/pharos/blob/develop/docs/development/conventions/pull-requests.md">guidelines</PharosLink>{/* <!--- pretiier-ignore-stop --> */}
, fill out the pull request template as best you can, and request a review from the{' '}
<i>Pharos maintainers</i> team.
</li>
<li>
<strong>Pass checks:</strong>
<ol>
<li>Lint - Analyzes your code for problematic patterns</li>
<li>Test - Runs browser tests and validates code coverage thresholds are met</li>
<li>
Chromatic (for Storybook and component related changes) - Takes snapshots of all stories
in Storybook and compares them against the baseline
</li>
<li>
Netlify preview (for site related changes) - Generates a preview build of the site for the
maintainers to review and provide feedback
</li>
</ol>
</li>
<li>
<strong>Await approval:</strong> Address feedback and get approval from development and
design. From here the maintainers will merge your changes and include it in the next release.
</li>
</ol>
</PageSection>
</>
Loading

0 comments on commit 2c51ada

Please sign in to comment.