-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
docs: add default stories for IDE components #2398
Changes from 2 commits
018514a
98d15ae
50788e5
994636b
2d3e04f
aa39dd1
ea5b5fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import About from './About'; | ||
|
||
export default { | ||
title: 'IDE/About', | ||
component: About | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import AssetPreview from './AssetPreview'; | ||
|
||
export default { | ||
title: 'IDE/AssetPreview', | ||
component: AssetPreview | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
url: 'https://p5js.org/assets/img/p5js.svg', | ||
name: 'P5 Logo' | ||
} | ||
}; | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import AssetSize from './AssetSize'; | ||
|
||
export default { | ||
title: 'IDE/AssetSize', | ||
component: AssetSize | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
totalSize: 123 | ||
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. This story shows up with a control for the Once we get the styles working and once we get this using the |
||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Console from './Console'; | ||
|
||
export default { | ||
title: 'IDE/Console', | ||
component: Console | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import ConsoleInput from './ConsoleInput'; | ||
|
||
export default { | ||
title: 'IDE/ConsoleInput', | ||
component: ConsoleInput | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import CopyableInput from './CopyableInput'; | ||
|
||
export default { | ||
title: 'IDE/CopyableInput', | ||
component: CopyableInput | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
value: 'Lorem Ipsum' | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import EditableInput from './EditableInput'; | ||
|
||
export default { | ||
title: 'IDE/EditableInput', | ||
component: EditableInput | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
value: '[email protected]', | ||
label: 'Example' | ||
} | ||
}; | ||
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. We aren't seeing the pencil icon here due to an issue with |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import EditorAccessibility from './EditorAccessibility'; | ||
|
||
export default { | ||
title: 'IDE/EditorAccessibility', | ||
component: EditorAccessibility | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
lintMessages: [ | ||
{ | ||
severity: 'warn', | ||
line: '10', | ||
message: 'Warning Foo', | ||
id: '123' | ||
} | ||
] | ||
} | ||
}; | ||
ofhope marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import Feedback from './Feedback'; | ||
|
||
export default { | ||
title: 'IDE/Feedback', | ||
component: Feedback | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import FileUploader from './FileUploader'; | ||
|
||
export default { | ||
title: 'IDE/FileUploader', | ||
component: FileUploader | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import FloatingActionButton from './FloatingActionButton'; | ||
|
||
export default { | ||
title: 'IDE/FloatingActionButton', | ||
component: FloatingActionButton | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import KeyboardShortcutModal from './KeyboardShortcutModal'; | ||
|
||
export default { | ||
title: 'IDE/KeyboardShortcutModal', | ||
component: KeyboardShortcutModal | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import NewFileForm from './NewFileForm'; | ||
|
||
export default { | ||
title: 'IDE/NewFileForm', | ||
component: NewFileForm | ||
}; | ||
|
||
export const Default = {}; | ||
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. The TBH we could consider combing the two component files as there's not much left in the 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. I like the idea of having fewer Modals and reusing the generic one. I think thats capturing the layout primitives 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. I've removed |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import NewFileModal from './NewFileModal'; | ||
|
||
export default { | ||
title: 'IDE/NewFileModal', | ||
component: NewFileModal | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import NewFolderForm from './NewFolderForm'; | ||
|
||
export default { | ||
title: 'IDE/NewFolderForm', | ||
component: NewFolderForm | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import NewFolderModal from './NewFolderModal'; | ||
|
||
export default { | ||
title: 'IDE/NewFolderModal', | ||
component: NewFolderModal | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import ShareModal from './ShareModal'; | ||
|
||
export default { | ||
title: 'IDE/ShareModal', | ||
component: ShareModal | ||
}; | ||
|
||
export const Default = {}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import SketchList from './SketchList'; | ||
|
||
export default { | ||
title: 'IDE/SketchList', | ||
component: SketchList | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
user: { | ||
username: 'Joe Blogs', | ||
authenticated: true | ||
}, | ||
username: 'Joe Blogs', | ||
loading: false, | ||
sketches: [ | ||
{ | ||
id: '1', | ||
name: 'Play Sketch', | ||
createdAt: Date.now().toString(), | ||
updatedAt: Date.now().toString() | ||
} | ||
] | ||
Comment on lines
+16
to
+23
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. I was wondering why these sketches don't show up in the list. Again, it's because the component ignores this prop and gets the actual value from Redux. 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. Ahhh! I was wondering that myself but was unsure. |
||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import UploadFileModal from './UploadFileModal'; | ||
|
||
export default { | ||
title: 'IDE/UploadFileModal', | ||
component: UploadFileModal | ||
}; | ||
|
||
export const Default = {}; |
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.
We can add stories for audio and video files (can be done later).