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

[CLI-135] feat: add custom template edition w/preview #267

Merged
merged 24 commits into from
Apr 30, 2021
Merged

[CLI-135] feat: add custom template edition w/preview #267

merged 24 commits into from
Apr 30, 2021

Conversation

alejofernandez
Copy link
Member

@alejofernandez alejofernandez commented Apr 27, 2021

Description

The purpose of this PR is to add support for creating and editing the Custom Template for New Universal Login.

Features included:

  • If the template exists it launches an editor that allows the user to modify the template and send the changes back to the management API
  • If the template doesn't exist it allows to create a template based on 3 different templates (exactly what we have on our docs)
  • While the user has the editor open, it launches a local http server with a live preview of the changes made to the template.

cli-template

References

Include any links supporting this change such as a:

  • GitHub Issue/PR number addressed or fixed
  • Auth0 Community post
  • StackOverflow post
  • Support forum thread
  • Related pull requests/issues from other repos

If there are no references, simply delete this section.

Testing

Just run the following command and follow the on-screen instructions

auth0 branding template update
  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@Widcket Widcket requested a review from a team April 27, 2021 17:33
@alejofernandez alejofernandez force-pushed the cli-135 branch 2 times, most recently from 82e30af to c748c9e Compare April 27, 2021 22:17
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
server.Close doesn't close it, best I can tell.
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
internal/cli/template.go Outdated Show resolved Hide resolved
cyx added 3 commits April 30, 2021 11:33
TL;DR we need to watch an entire dir instead of just one file.  But also, when
doing that, just utilizing the entire tmpdir is overkill since that's got many
many files in there -- which in practice causes vim to segfault.

The fix is simple: make a tempdir, make the tempfile within that, and clean
those up in reverse order.
Copy link
Contributor

@Widcket Widcket left a comment

Choose a reason for hiding this comment

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

👏🏼

@Widcket Widcket merged commit 60c02ca into main Apr 30, 2021
@Widcket Widcket deleted the cli-135 branch April 30, 2021 21:41
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