Skip to content
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

jsx-slack v2 #141

Merged
merged 148 commits into from
Apr 23, 2020
Merged

jsx-slack v2 #141

merged 148 commits into from
Apr 23, 2020

Conversation

yhatt
Copy link
Owner

@yhatt yhatt commented Apr 14, 2020

I'm happy to announce jsx-slack v2 is now in beta! ✨

npm install --save @speee-js/jsx-slack@next

I've fully rewritten JSX structure and built-in components based on a proposal at #128.

▶︎ See highlight of v2

▶︎ Show v2 branch

▶︎ REPL demo in v2

We want to collect feedback to v2 beta for a while. If had no critical problems, I'm going to merge into master and bump to v2 in late April or early May.

Remaining ToDo in beta

For now #20 is not scope of v2 release.


Breaking

  • Checked states defined in <CheckboxGroup values> and <Checkbox checked> do no longer merge
  • Breaking for TypeScript
    • Require TypeScript >= 3.7 when using jsx-slack through TypeScript
    • Container components have strict type checking for its children
    • Exported type JSXSlack.Child and JSXSlack.Children have been renamed into JSXSlack.ChildElement and JSXSlack.ChildElements and no longer provided generics

Changed

  • Fully rewrote JSX structure to render from JSX to JSON directly (#128)
  • All built-in components can render the partial JSON of Block Kit
  • <Home> container now accepts <Input type="hidden" /> and custom transformer to store private metadata
  • value prop for <Option> has made optional to follow HTML specification
  • confirm prop for interactive block elements accepts the raw confirm composition object
  • <a> tag renders short syntax for hyperlink if possible
  • Throws error with more helpful message and stacktrace when there is invalid JSX structure (#143)
  • Bundle modules through rollup (#144)

Added

  • React-compatible public APIs: JSXSlack.createElement, JSXSlack.isValidElement, and JSXSlack.Children helpers
  • HTML-compatible <Option selected> and <RadioButton checked>
  • value prop as an alias into initialXXX prop in some interactive components
  • Added JSDoc to many public APIs and components
  • Support new JSX transpile via automatic runtime in Babel >= 7.9 (experimental) (#142)
  • REPL demo now generates the permalink to specific JSX (#149)
  • Dark mode for REPL demo (#150)
  • New logo and logo type (#152)

Fixed

  • Suggest string literals on IDE when typing the kind of conversation in <ConversationsSelect include> (#145)

Removed

  • Deprecated features in v1: JSXSlack.legacyParser() and jsxslack.fragment

Deprecated

  • jsxslack.raw template literal tag (It has become just an alias to jsxslack in v2)

Yuki Hattori and others added 30 commits March 11, 2020 14:19
Now got similar compatibility with React.
NOTE: Renamed `Child` to `ChildElement`, and `Children` to
`ChildElements`.
@yhatt yhatt linked an issue Apr 14, 2020 that may be closed by this pull request
Yuki Hattori added 22 commits April 15, 2020 14:21
…ntal) (#142)

* Support automatic runtime mode for Babel transpiler

* Disable ESLint for reference to built code

* Remove unnecessary import and export for jsx-dev-runtime

* Update structure of test cases for Babel

* Add documentation of "How to setup JSX transpiler"

* Add link

* Update v2 highlights

* Fix README.md
…ossible (#143)

* Throw JSXSlackError instead of Error

* Reset stack trace if have already known the sourcemap of error caused element

* Update CHANGELOG.md and v2 highlights
* Bundle modules through rollup

* [ci skip] Update CHANGELOG.md

* Update README.md
…ion in <ConversationsSelect include> (#145)

* Improve suggestion of filter kinds in IDE

* Fix plural

* [ci skip] Update CHANGELOG.md
* Add JSDoc for intrinsic HTML elements

* Fix JSDoc for value prop of <li> tag
* Update demo schema and design

* Apply Prettier formatting
w/ included fancy scrollbar (only for WebKit)
* Generate permalink to specific JSX in REPL

* Don't stack history when updating hash

* Unified design of demo page in cross-browser

* Apply Prettier formatting

* Update CHANGELOG.md
* Generate permalink to specific JSX in REPL

* Don't stack history when updating hash

* Unified design of demo page in cross-browser

* Support dark mode in demo REPL

* [ci skip] Update CHANGELOG.md

* Add new section to v2 highlights: REPL demo in v2

* Update section level
* Add permalink to example ported from BKB templates

* Fix example of notification settings modal

* Apply lazy loading for images on demo page

* Update preview buttons in documentation

Use redirection by REPL if possible.
* Update jsx-slack logo and logotype

* Apply informations for Open Graph Protocol to REPL

* Update example picture of JSX

* Update some sentences on README.md

* Apply Prettier formatting
Use absolute path to avoid broken link in release page.
@yhatt yhatt merged commit f65765b into master Apr 23, 2020
@yhatt yhatt deleted the v2 branch April 23, 2020 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSX interface v2
1 participant