-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
components for generic HTML elements #2456
Conversation
|
||
export class Table extends React.PureComponent<ITableHtmlProps> { | ||
public render() { | ||
const { bordered, className, elementRef, interactive, small, striped, ...htmlProps } = this.props; |
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.
className
should be passed to classes
down below
public static metadata: Lint.IRuleMetadata = { | ||
ruleName: "blueprint-html-components", | ||
// tslint:disable-next-line:object-literal-sort-keys | ||
description: "Enforce usage of Blueprint components over JSX intrinsic elements.", |
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.
probably worth adding a rationale here explaining why in more details (metadata supports an actual rationale
field)
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.
or just have a docs page with an explanation for the rules
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.
I think you already did this actually, I skipped that file haha
@@ -0,0 +1,5 @@ | |||
<h1>Title</h1> |
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.
don't really need a test case for when the rule is disabled
|
||
<H3>Subtitle</H3> | ||
<Pre>block</Pre> | ||
|
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.
maybe test some self closing tags too just for the heck of it
- `Pre` | ||
- `Ol` | ||
- `Ul` | ||
- `Table` (see [Table (HTML)](http://localhost:9000/#core/components/table-html)) |
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.
Controversial proposal: I know we're mimicking HTML here, but since this is React stuff, what do you think about Heading1...6
, OrderedList
, UnorderedList
...?
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.
uppercase in docs
1f06410
to
ac38d2d
Compare
remove false lint testPreview: documentation | landing | table |
uppercase UL/OL in docsPreview: documentation | landing | table |
fix more lintPreview: documentation | landing | table |
exclude Table from coveragePreview: documentation | landing | table |
@@ -57,11 +58,7 @@ export class Hotkeys extends AbstractPureComponent<IHotkeysProps, {}> { | |||
for (const hotkey of hotkeys) { | |||
const groupLabel = hotkey.group; | |||
if (groupLabel !== lastGroup) { | |||
elems.push( | |||
<h4 key={`group-${elems.length}`} className={Classes.HOTKEY_GROUP}> |
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.
removing this class name might break people's selectors, right?
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.
yes true it might, but it's been replaced with HEADING
remove extra spacePreview: documentation | landing | table |
delete Classes.HOTKEY_GROUPPreview: documentation | landing | table |
H1-6
,Blockquote
,Code
,Pre
,Ul
,Ol
,Table
blueprint-html-components
TSLint ruleClasses.HOTKEY_GROUP