Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Add heading example #946

Merged
merged 10 commits into from
Dec 12, 2021
Merged

chore: Add heading example #946

merged 10 commits into from
Dec 12, 2021

Conversation

saideepesh000
Copy link
Member

Hai @diegohaz , I want to contribute to this project.

This PR adds heading example for #939

@vercel
Copy link

vercel bot commented Dec 12, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

ariakit – ./

🔍 Inspect: https://vercel.com/ariakit/ariakit/BgxckM5TFiTRa4EXYUyMbHzPJV8b
✅ Preview: https://ariakit-git-fork-saideepesh000-example-heading-ariakit.vercel.app

reakit – ./

🔍 Inspect: https://vercel.com/ariakit/reakit/EromTBpZtyyyV6C6netAFBc6hBDk
✅ Preview: Canceled

[Deployment for e73f329 canceled]

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 12, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@codecov
Copy link

codecov bot commented Dec 12, 2021

Codecov Report

Merging #946 (e73f329) into v2 (99e0377) will increase coverage by 0.37%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##               v2     #946      +/-   ##
==========================================
+ Coverage   33.02%   33.39%   +0.37%     
==========================================
  Files         145      146       +1     
  Lines        4061     4063       +2     
  Branches     1153     1153              
==========================================
+ Hits         1341     1357      +16     
+ Misses       2719     2705      -14     
  Partials        1        1              
Impacted Files Coverage Δ
...ariakit/src/heading/__examples__/heading/index.tsx 100.00% <100.00%> (ø)
packages/ariakit/src/heading/heading.ts 100.00% <0.00%> (+100.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99e0377...e73f329. Read the comment docs.

@vercel vercel bot temporarily deployed to Preview – reakit December 12, 2021 08:42 Inactive
@diegohaz diegohaz changed the title feat: add example heading chore: Add Heading example Dec 12, 2021
Comment on lines 6 to 19
<HeadingLevel>
<div role="heading-container" className="headingContainer">
<Heading>Lacus Et Semper Turpis Massa Commodo Cum</Heading>
<p>Torquent penatibus ipsum nascetur cursus primis lobortis</p>
<HeadingLevel>
<Heading>Ac Nullam</Heading>
<p>Volutpat metus id purus dignissim fusce Tellus egestas.</p>
</HeadingLevel>
<HeadingLevel>
<Heading>Quis Placerat</Heading>
<p>Platea justo lectus. Praesent. Et sodales pellentesque</p>
</HeadingLevel>
</div>
</HeadingLevel>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! heading-container is not a valid role though.

Suggested change
<HeadingLevel>
<div role="heading-container" className="headingContainer">
<Heading>Lacus Et Semper Turpis Massa Commodo Cum</Heading>
<p>Torquent penatibus ipsum nascetur cursus primis lobortis</p>
<HeadingLevel>
<Heading>Ac Nullam</Heading>
<p>Volutpat metus id purus dignissim fusce Tellus egestas.</p>
</HeadingLevel>
<HeadingLevel>
<Heading>Quis Placerat</Heading>
<p>Platea justo lectus. Praesent. Et sodales pellentesque</p>
</HeadingLevel>
</div>
</HeadingLevel>
<div className="wrapper">
<HeadingLevel>
<Heading>Lacus Et Semper Turpis Massa Commodo Cum</Heading>
<p>Torquent penatibus ipsum nascetur cursus primis lobortis</p>
<HeadingLevel>
<Heading>Ac Nullam</Heading>
<p>Volutpat metus id purus dignissim fusce Tellus egestas.</p>
</HeadingLevel>
<HeadingLevel>
<Heading>Quis Placerat</Heading>
<p>Platea justo lectus. Praesent. Et sodales pellentesque</p>
</HeadingLevel>
</HeadingLevel>
</div>

Comment on lines 1 to 15
.headingContainer{
@apply flex flex-col
}

h1{
@apply text-xl
}

h2{
@apply text-lg mt-4
}

h3{
@apply text-base mt-4
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the wrapper class and some formatting. It would be awesome if prettier worked on CSS files.

Suggested change
.headingContainer{
@apply flex flex-col
}
h1{
@apply text-xl
}
h2{
@apply text-lg mt-4
}
h3{
@apply text-base mt-4
}
.wrapper {
@apply flex flex-col
}
h1 {
@apply text-xl
}
h2 {
@apply text-lg mt-4
}
h3 {
@apply text-base mt-4
}

Comment on lines 5 to 6
render(<Example />);
expect(getByRole("heading-container")).toMatchInlineSnapshot(`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
render(<Example />);
expect(getByRole("heading-container")).toMatchInlineSnapshot(`
const { container } = render(<Example />);
expect(container).toMatchInlineSnapshot(`

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your suggestions @diegohaz , made all the changes, one final time(hopefully :))

Copy link
Member

@diegohaz diegohaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thank you @saideepesh000!

@diegohaz diegohaz merged commit 3732e22 into ariakit:v2 Dec 12, 2021
@ariakit-bot
Copy link

Thanks a lot for contributing!

Based on our community guidelines, every person who has a PR of any kind merged is offered an invitation to the Reakit organization.

Should you accept, you'll get write access to the main repository and a fancy Reakit logo on your GitHub profile. You'll be able to label and close issues, create new branches etc. Make sure to read our contribution and community guidelines, which explains all of this in more detail.

If you have any questions, let me know!

@saideepesh000 saideepesh000 deleted the example/heading branch December 13, 2021 10:26
@diegohaz diegohaz changed the title chore: Add Heading example chore: Add heading example Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants