Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

onboarding modules#1391

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
levkk merged 20 commits intomasterfromlevkk-onboarding-v2
Apr 2, 2024
Merged

onboarding modules#1391

levkk merged 20 commits intomasterfromlevkk-onboarding-v2
Apr 2, 2024

Conversation

levkk
Copy link
Contributor

@levkklevkk commentedMar 27, 2024
edited
Loading

New components

Small table

image

Green heading

image

Blue heading

image

Input with optional icon

image

Dropdown input with search

Dropdown input with backend-powered search.

image

Badges (small)

image

Badges (large)

image

Range input v2

image

Switch v2

image

Radio

image

Select (dropdown) with display/value separation

image

Select supports different values for display in the option and the<input> field. This is useful when display options aren't easily serializable to values the backend can understand.

RGB card

image

Fixes

  • Remove extra padding from the bottom of the dropdown<ul> (now it's 20px top and 20px bottom padding)
  • AddDebug implementation forComponent

@levkklevkk marked this pull request as ready for reviewApril 1, 2024 23:02
Comment on lines 13 to 15
span.material-symbols-outlined {
color: #{$white};
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also just add text-white to the class of this component.

levkk reacted with thumbs up emoji
span[data-controller="badges-large-label"] {
padding: 8px;
background: #{$gray-500};
border-radius: 8px;
Copy link
Contributor

Choose a reason for hiding this comment

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

bs-border4-radius or class rounded-2

levkk reacted with thumbs up emoji
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

--bs-border-radius sets the border radius for Bootstrap components that declare theborder-radius: var(--bs-border-radius) in their CSS. This is a new component, so we have to set the border radius with probablyrounded-2 as you suggested.

@@ -0,0 +1,6 @@
div[data-controller="cards-rgb"] {
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't tell but If this doesn't have a hover state, it needs one.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

You're right, it doesn't have one. I don't think there is one in the design. I'll flag it for review and follow up with a PR.

chillenberger reacted with thumbs up emoji
@@ -0,0 +1,18 @@
use pgml_components::component;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just use our text-gradient-blue class and remove this component?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yes we can. I think though CSS classes are harder to discover than components. I'm starting to think we should lean on components even more to make our UI more consistent and re-usable. I can see in the future our HTML templates being composed entirely of code like<%+ SomeComponent::new() %>.

@@ -0,0 +1,18 @@
use pgml_components::component;
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above, can we just just text-gradient-green class here.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

I should definitely re-use that class here.

export default class extends Controller {
static targets = ["button"];

onClick(e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

levkk reacted with thumbs up emoji
div[data-controller="inputs-text-search"] {
.dropdown {
.dropdown-menu {
padding: 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just add p-0 class to html?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Because this re-uses theDropdown component which doesn't support (and shouldn't in my opinion) adding custom classes to an element. This overrides theDropdown style.

chillenberger reacted with thumbs up emoji
@@ -0,0 +1,19 @@
import { Controller } from "@hotwired/stimulus";

export default class extends Controller {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want something to limit the query speed?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Yeah, do we have anything? I think we have underscore and_.debounce?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I believe it comes from lodash.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Ah yeah, lodash is the new library replacing underscore. I'm old.

@@ -0,0 +1,160 @@
<% use crate::components::tables::small::*; %>
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to have playground and demo.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Ah yeah, I was looking for playground and didn't find it. That's weird...

Copy link
Contributor

Choose a reason for hiding this comment

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

Playground was made so long ago it is still hidden in the templates and is not a component. It should probably be refactored into a component. Maybe we move the playground stuff to your demo page an remove playground.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Works for me. It's just a place to make sure components work before using them in our other apps.

@@ -120,6 +120,7 @@ $hp-white: #{$gray-200};
// Background Colors
$bg-white: #F8FAFC;
$bg-black: #0D0D0E;
$bg-black-1: #17181A;
Copy link
Contributor

Choose a reason for hiding this comment

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

We shouldn't need to add any colors. this is gray-800. If we need this variable to it like$bg-black-1: #{$gray-800}; or just use gray-800 in the css you are trying to use this for.

levkk reacted with thumbs up emoji
@levkk
Copy link
ContributorAuthor

Going to probably have to make more changes as I integrate this into our main app. More PRs to follow.

@levkklevkk merged commitb354214 intomasterApr 2, 2024
@levkklevkk deleted the levkk-onboarding-v2 branchApril 2, 2024 19:18
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@chillenbergerchillenbergerchillenberger left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@levkk@chillenberger

[8]ページ先頭

©2009-2025 Movatter.jp