Skip to content

rebase and add codemirror in AuthResults.js w/ theme#47

Open
WizardSource wants to merge 2 commits into
redwoodjs:mainfrom
WizardSource:main
Open

rebase and add codemirror in AuthResults.js w/ theme#47
WizardSource wants to merge 2 commits into
redwoodjs:mainfrom
WizardSource:main

Conversation

@WizardSource

Copy link
Copy Markdown

Screen Shot 2021-04-18 at 8 57 05 PM

@netlify

netlify Bot commented Apr 19, 2021

Copy link
Copy Markdown

‼️ Deploy request for redwood-playground-auth rejected.
Learn more about Netlify's sensitive variable policy

🔨 Explore the source changes: 4915724

@dthyresson dthyresson requested a review from Tobbe April 19, 2021 19:54
@dthyresson

Copy link
Copy Markdown
Contributor

@WizardSource thanks for this! I know we pushed a few other UI changes in but letting @Tobbe have a look as this can def clear up the JSON user metadata for the moment.

Comment thread web/src/components/AuthResults/AuthResults.js Outdated
currentUser:
<pre style={{ margin: 0 }}>{JSON.stringify(currentUser, null, 2)}</pre>
</code>
const authData = (userMetadata, currentUser) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd move this function out of the component. No need to recreate it on every render.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@Tobbe Thank you, will implement that once I get out of class and look into highlightjs

return (
<div className="w-full text-sm">
<p className="mt-2 text-sm text-gray-600 max-w"> Last update {lastUpdate}</p>
<Codemirror

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we use CodeMirror or highlightjs? Redwoodjs.com uses highlightjs.

We're going to have code samples, and maybe these presentations should use the same package?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CodeMirror is a code editor. Are we going to be using any of the edit features? If not, I say we use the same here as we do for the code samples

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ok, if

CodeMirror is a code editor.

then that doesn't seem the best tool.

I think @morganmspencer is working on the Code Samples. Once those are in, we can use the same package here to format the JSON for the User.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@dthyresson that makes sense, I actually am not familiar w/ highlightjs I'll take a look at it once I'm done with class.

Co-authored-by: Tobbe Lundberg <tobbe@tlundberg.com>
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.

3 participants