-
Notifications
You must be signed in to change notification settings - Fork 3.7k
fix(skills): show the new skill after creating it #5949
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
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e538a56
fix(skills): show the new skill after creating it
waleedlatif1 2228383
improvement(skills): align the custom tools row and harden the guard …
waleedlatif1 ee80756
fix(skills): retire the in-app back guard on release too
waleedlatif1 6aad77e
fix(skills): track a sentinel consumed while the guard is released
waleedlatif1 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
6 changes: 5 additions & 1 deletion
6
apps/sim/app/workspace/[workspaceId]/components/resource-tile/index.ts
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 |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| export { ResourceTile } from '@/app/workspace/[workspaceId]/components/resource-tile/resource-tile' | ||
| export { | ||
| RESOURCE_TILE_BASE, | ||
| RESOURCE_TILE_FILL, | ||
| ResourceTile, | ||
| } from '@/app/workspace/[workspaceId]/components/resource-tile/resource-tile' |
22 changes: 16 additions & 6 deletions
22
apps/sim/app/workspace/[workspaceId]/components/resource-tile/resource-tile.tsx
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 |
|---|---|---|
| @@ -1,20 +1,30 @@ | ||
| import type { ComponentType } from 'react' | ||
| import { cn } from '@sim/emcn' | ||
|
|
||
| interface ResourceTileProps { | ||
| icon: ComponentType<{ className?: string }> | ||
| } | ||
|
|
||
| /** | ||
| * Geometry and border of the square resource tile — the single source for that | ||
| * chrome, shared by {@link ResourceTile} and `SettingsResourceRow` so the skills, | ||
| * custom tools, and settings surfaces cannot drift apart. Pair with a fill. Sizing | ||
| * the glyph is the tile's job: the descendant rule outranks an icon's own class. | ||
| */ | ||
| export const RESOURCE_TILE_BASE = | ||
| 'flex size-9 flex-shrink-0 items-center justify-center overflow-hidden rounded-xl border border-[var(--border-1)] [&_svg]:size-5' | ||
|
|
||
| /** Filled treatment worn by the skills and custom tools resource tiles. */ | ||
| export const RESOURCE_TILE_FILL = 'bg-[var(--surface-4)] dark:bg-[var(--surface-5)]' | ||
|
|
||
| /** | ||
| * Square glyph tile identifying a workspace resource — the leading visual on a | ||
| * resource's row and on its detail heading. Single source for that chrome so | ||
| * the skills and custom tools surfaces cannot drift apart. | ||
| * resource's row and on its detail heading. | ||
| */ | ||
| export function ResourceTile({ icon: Icon }: ResourceTileProps) { | ||
| return ( | ||
| <div className='size-9 flex-shrink-0'> | ||
| <div className='flex size-full items-center justify-center rounded-xl border border-[var(--border-1)] bg-[var(--surface-4)] dark:bg-[var(--surface-5)]'> | ||
| <Icon className='size-5 text-[var(--text-icon)]' /> | ||
| </div> | ||
| <div className={cn(RESOURCE_TILE_BASE, RESOURCE_TILE_FILL)}> | ||
| <Icon className='text-[var(--text-icon)]' /> | ||
| </div> | ||
| ) | ||
| } |
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
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
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.
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.
Uh oh!
There was an error while loading. Please reload this page.