-
Notifications
You must be signed in to change notification settings - Fork 3.3k
improvement: template use button #1954
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
Merged
Merged
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -522,7 +522,7 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template | |||||
| <div className={cn('flex min-h-screen flex-col', isWorkspaceContext && 'pl-64')}> | ||||||
| <div className='flex flex-1 overflow-hidden'> | ||||||
| <div className='flex flex-1 flex-col overflow-auto px-[24px] pt-[24px] pb-[24px]'> | ||||||
| {/* Top bar with back button and action buttons */} | ||||||
| {/* Top bar with back button */} | ||||||
| <div className='flex items-center justify-between'> | ||||||
| {/* Back button */} | ||||||
| <button | ||||||
|
|
@@ -532,6 +532,11 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template | |||||
| <ArrowLeft className='h-[14px] w-[14px]' /> | ||||||
| <span>Back</span> | ||||||
| </button> | ||||||
| </div> | ||||||
|
|
||||||
| {/* Template name and action buttons */} | ||||||
| <div className='mt-[24px] flex items-center justify-between'> | ||||||
| <h1 className='font-medium text-[18px]'>{template.name}</h1> | ||||||
|
|
||||||
| {/* Action buttons */} | ||||||
| <div className='flex items-center gap-[8px]'> | ||||||
|
|
@@ -636,9 +641,9 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template | |||||
| variant='primary' | ||||||
| onClick={handleUseTemplate} | ||||||
| disabled={isUsing} | ||||||
| className='h-[32px] rounded-[6px]' | ||||||
| className='!text-[#FFFFFF] h-[32px] rounded-[6px] px-[12px] text-[14px]' | ||||||
| > | ||||||
| {isUsing ? 'Creating...' : 'Use'} | ||||||
| {isUsing ? 'Creating...' : 'Use template'} | ||||||
| </Button> | ||||||
| ) : ( | ||||||
| <DropdownMenu | ||||||
|
|
@@ -650,7 +655,7 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template | |||||
| variant='primary' | ||||||
| onClick={() => setShowWorkspaceSelectorForUse(true)} | ||||||
| disabled={isUsing || isLoadingWorkspaces} | ||||||
| className='h-[32px] rounded-[6px]' | ||||||
| className='h-[32px] rounded-[6px] px-[16px] text-[#FFFFFF] text-[14px]' | ||||||
|
Contributor
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. style: inconsistent styling - this button uses
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: apps/sim/app/templates/[id]/template.tsx
Line: 658:658
Comment:
**style:** inconsistent styling - this button uses `text-[#FFFFFF]` (no `!important`) while line 644 uses `!text-[#FFFFFF]` (with `!important`)
```suggestion
className='h-[32px] rounded-[6px] px-[16px] text-[14px]'
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||
| > | ||||||
| {isUsing ? 'Creating...' : isLoadingWorkspaces ? 'Loading...' : 'Use'} | ||||||
| <ChevronDown className='ml-2 h-4 w-4' /> | ||||||
|
|
@@ -685,12 +690,9 @@ export default function TemplateDetails({ isWorkspaceContext = false }: Template | |||||
| </div> | ||||||
| </div> | ||||||
|
|
||||||
| {/* Template name */} | ||||||
| <h1 className='mt-[24px] font-medium text-[18px]'>{template.name}</h1> | ||||||
|
|
||||||
| {/* Template tagline */} | ||||||
| {template.details?.tagline && ( | ||||||
| <p className='mt-[8px] font-medium text-[#888888] text-[14px]'> | ||||||
| <p className='mt-[4px] font-medium text-[#888888] text-[14px]'> | ||||||
| {template.details.tagline} | ||||||
| </p> | ||||||
| )} | ||||||
|
|
||||||
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
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.
style: using
!importantwith!text-[#FFFFFF]is a styling anti-pattern - the button already has proper text color from theprimaryvariantPrompt To Fix With AI