-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Migrate _forms.scss to Tailwind: Part 2
#3299
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
Draft
SalmanNajah
wants to merge
11
commits into
antiwork:main
Choose a base branch
from
SalmanNajah:forms-migration-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
5a70e2d
Migrate settings pages to Tailwind
SalmanNajah 13e1e41
Merge branch 'main' into forms-migration-2
SalmanNajah 14d9ee6
Merge branch 'main' into forms-migration-2
SalmanNajah ae22681
Merge remote-tracking branch 'origin/main' into forms-migration-2
SalmanNajah 4248456
eslint
SalmanNajah 0f4a06c
fix
SalmanNajah 4977a27
fix
SalmanNajah 10fc88d
Remove .combobox and option SCSS
SalmanNajah a37e4a4
fix
SalmanNajah 883b132
fix
SalmanNajah 1ad1386
Merge branch 'main' into forms-migration-2
SalmanNajah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -58,6 +58,8 @@ import { Posts, PostsProvider } from "$app/components/TiptapExtensions/Posts"; | |||||||||||||||||||||
| import { ShortAnswer } from "$app/components/TiptapExtensions/ShortAnswer"; | ||||||||||||||||||||||
| import { UpsellCard } from "$app/components/TiptapExtensions/UpsellCard"; | ||||||||||||||||||||||
| import { Card, CardContent } from "$app/components/ui/Card"; | ||||||||||||||||||||||
| import { Checkbox } from "$app/components/ui/Checkbox"; | ||||||||||||||||||||||
| import { Label } from "$app/components/ui/Label"; | ||||||||||||||||||||||
| import { Row, RowContent, Rows } from "$app/components/ui/Rows"; | ||||||||||||||||||||||
| import { Tab, Tabs } from "$app/components/ui/Tabs"; | ||||||||||||||||||||||
| import { Product, ProductOption, UpsellSelectModal } from "$app/components/UpsellSelectModal"; | ||||||||||||||||||||||
|
|
@@ -1064,16 +1066,18 @@ export const ContentTab = () => { | |||||||||||||||||||||
| <> | ||||||||||||||||||||||
| <hr className="relative left-1/2 my-2 w-screen max-w-none -translate-x-1/2 border-border lg:hidden" /> | ||||||||||||||||||||||
| <ComboBox<Variant> | ||||||||||||||||||||||
| // TODO: Currently needed to get the icon on the selected option even though this is not multiple select. We should fix this in the design system | ||||||||||||||||||||||
| multiple | ||||||||||||||||||||||
| input={(props) => ( | ||||||||||||||||||||||
| <div {...props} className="input h-full min-h-auto" aria-label="Select a version"> | ||||||||||||||||||||||
| <span className="fake-input text-singleline"> | ||||||||||||||||||||||
| <div | ||||||||||||||||||||||
| {...props} | ||||||||||||||||||||||
| className="inline-flex h-full min-h-auto cursor-pointer items-center gap-2 rounded border border-border bg-background px-4 py-3" | ||||||||||||||||||||||
| aria-label="Select a version" | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| <span className="text-singleline flex-1"> | ||||||||||||||||||||||
| {selectedVariant && !product.has_same_rich_content_for_all_variants | ||||||||||||||||||||||
| ? `Editing: ${selectedVariant.name || "Untitled"}` | ||||||||||||||||||||||
| : "Editing: All versions"} | ||||||||||||||||||||||
| </span> | ||||||||||||||||||||||
| <Icon name="outline-cheveron-down" /> | ||||||||||||||||||||||
| <Icon name="outline-cheveron-down" className="text-muted" /> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
| options={product.variants} | ||||||||||||||||||||||
|
|
@@ -1088,7 +1092,7 @@ export const ContentTab = () => { | |||||||||||||||||||||
| aria-selected={item.id === selectedVariantId} | ||||||||||||||||||||||
| inert={product.has_same_rich_content_for_all_variants} | ||||||||||||||||||||||
| > | ||||||||||||||||||||||
| <div> | ||||||||||||||||||||||
| <div className="flex-1"> | ||||||||||||||||||||||
| <h4>{item.name || "Untitled"}</h4> | ||||||||||||||||||||||
| {item.id === selectedVariant?.id ? ( | ||||||||||||||||||||||
| <small>Editing</small> | ||||||||||||||||||||||
|
|
@@ -1109,12 +1113,14 @@ export const ContentTab = () => { | |||||||||||||||||||||
| <small className="text-muted">No content yet</small> | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| {item.id === selectedVariant?.id && ( | ||||||||||||||||||||||
| <Icon name="solid-check-circle" className="ml-auto text-success" /> | ||||||||||||||||||||||
| )} | ||||||||||||||||||||||
|
Comment on lines
+1116
to
+1118
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Replaced SCSS based gumroad/app/javascript/stylesheets/_forms.scss Lines 358 to 367 in 8766b7d
|
||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| {index === product.variants.length - 1 ? ( | ||||||||||||||||||||||
| <div className="option"> | ||||||||||||||||||||||
| <label style={{ alignItems: "center" }}> | ||||||||||||||||||||||
| <input | ||||||||||||||||||||||
| type="checkbox" | ||||||||||||||||||||||
| <div className="flex cursor-pointer items-center px-4 py-2"> | ||||||||||||||||||||||
| <Label className="items-center"> | ||||||||||||||||||||||
| <Checkbox | ||||||||||||||||||||||
| checked={product.has_same_rich_content_for_all_variants} | ||||||||||||||||||||||
| onChange={() => { | ||||||||||||||||||||||
| if (!product.has_same_rich_content_for_all_variants && product.variants.length > 1) | ||||||||||||||||||||||
|
|
@@ -1123,7 +1129,7 @@ export const ContentTab = () => { | |||||||||||||||||||||
| }} | ||||||||||||||||||||||
| /> | ||||||||||||||||||||||
| <small>Use the same content for all versions</small> | ||||||||||||||||||||||
| </label> | ||||||||||||||||||||||
| </Label> | ||||||||||||||||||||||
| </div> | ||||||||||||||||||||||
| ) : null} | ||||||||||||||||||||||
| </> | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace SCSS classes with appropriate Tailwind classes.