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

Scaffold v2 #1209

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Scaffold v2 #1209

wants to merge 22 commits into from

Conversation

kaplanelad
Copy link
Contributor

This PR enhances the scaffold generator and prepares for a shell UI with registration, login, and logout.

  • Support Arrays
  • Move field definitions from Tera templates to code
  • Expand HTML field support
  • Better UI

@@ -0,0 +1,379 @@
use std::collections::HashMap;
Copy link
Contributor

Choose a reason for hiding this comment

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

if this file is just about helpers for views (scaffold etc) i would call it tera_scaffold_ext.rs
if its general extensions then:
tera_ext.rs

it's ok to name our engine explicitly (tera) just for the purpose of finding exactly what you're looking for "where is this tera builtin coming from? ah, tera_ext.rs"

<div class="relative flex min-h-screen flex-col bg-background">
<div class="themes-wrapper bg-background">
<div style="--sidebar-width:16rem;--sidebar-width-icon:3rem" class="group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar">
<main class="relative flex min-h-svh flex-1 flex-col bg-background peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow">
Copy link
Contributor

Choose a reason for hiding this comment

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

in the context of a "fresh" scaffold file, tailwind classes make it a very unhappy place to edit
can we create custom classes in our own CSS (or maybe in base) and use a single class in the different view files?

("uuid", "uuid_uniq"),
("uuid_col", "uuid_null"),
("uuid_col!", "uuid"),
("uuid^", "uuid_uniq"),
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe add a special doc about the new array types?

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.

2 participants