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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(example): add an example of using flash session #3043

Merged
merged 4 commits into from
May 4, 2022
Merged

docs(example): add an example of using flash session #3043

merged 4 commits into from
May 4, 2022

Conversation

michaeldebetaz
Copy link
Contributor

Creating an example for session.flash() a bit more advanced than what is in the Remix Docs. For example, I added the use of the element and a strategy to dynamically style the flash message.

This is my very first PR. Let me know if I could improve some things for my next PRs.

Thanks a lot. Remix rox. You guys are legends 馃槈

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 1, 2022

Hi @michaeldebetaz,

Welcome, and thank you for contributing to Remix!

Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.

You may review the CLA and sign it by adding your name to contributors.yml.

Once the CLA is signed, the CLA Signed label will be added to the pull request.

If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run.

Thanks!

- The Remix team

@remix-cla-bot
Copy link
Contributor

remix-cla-bot bot commented May 1, 2022

Thank you for signing the Contributor License Agreement. Let's get this merged! 馃コ

Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Thanks! I've just got a question.

Comment on lines +106 to +108
<form method="dialog">
<button>Close</button>
</form>
Copy link
Member

Choose a reason for hiding this comment

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

Can you help me understand this? I've never see method="dialog" before. Is this just a part of the form spec I've never heard of before?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Holy smokes 馃く

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for accepting my modest contribution 馃檹 I went a bit overboard with the #useThePlatform thing 馃構

I wanted to use the opportunity of my example to make other people learn surprising things on the way.

I wasn't sure about , as it isn't supported by Typescript yet (I had to import my own interface). But it's definitely nice to know a native way to create dialogs and modals without relying on Javascript.

In my case, I was more mind-blowned by color-scheme: dark light which use the browser for applying native dark theme (if preferred) without any additionnal CSS 馃く

Should I add a section to explain my Easter eggs?

Copy link
Member

Choose a reason for hiding this comment

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

Actually I almost asked you to remove that bit because we normally want to keep things as simple and focused as possible. I don't think we need to explain those things. Thanks though!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you then. I'll try to keep it more concise next time! I just didn't want to reproduce the exact same example as the one already in your docs 馃構

I'll see where my current project takes me, I would love to contribute again 馃敟

@kentcdodds kentcdodds added the needs-response We need a response from the original author about this issue/PR label May 4, 2022
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

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

Very cool. Thanks 馃憤

@kentcdodds kentcdodds merged commit db53fe5 into remix-run:main May 4, 2022
@michaeldebetaz michaeldebetaz deleted the michael/session-flash-example branch May 4, 2022 18:19
@MichaelDeBoey MichaelDeBoey removed the needs-response We need a response from the original author about this issue/PR label May 9, 2022
aaronpowell pushed a commit to aaronpowell/remix that referenced this pull request May 10, 2022
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
aaronpowell pushed a commit to aaronpowell/remix that referenced this pull request May 12, 2022
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
aaronpowell pushed a commit to aaronpowell/remix that referenced this pull request May 15, 2022
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
aaronpowell pushed a commit to aaronpowell/remix that referenced this pull request May 16, 2022
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants