Releases: MoOx/phenomic
v1.0.0-alpha.13
🎉 No breaking changes 🎉
Main reason of this release is the scalability issue: you can now build a website with hundreds of pages.
Pre-rendering step takes around 4s for 1000 pages 😁
🐛 Bugfix
@phenomic/core
: Fix issue when too many files are being transformed and contains undefined or null by adding a concurrency limit to hit API,
by @MoOx, reported by @ArthurClemens
👍 Improvement
@phenomic/core
: Stop shallowing error from API server during static build,
by @MoOx, reported by @ArthurClemens
✨ New feature
@phenomic/plugin-renderer-react
: expose html fromrenderApp()
result,
That allows CSS-in-JS to easily optimize (critical) CSS extraction.
by @MoOx
🌟 New Example
👌 Improved Examples
v1.0.0-alpha.12
🎉 No breaking changes 🎉
Only good stuff!
Notable additions & changes:
🔥 New plugin
@phenomic/plugin-transform-asciidoc
: Create asciidoc transformer plugin using Asciidoctor.js,
by @ezralalonde, requested by @kepinpin (in #1153)
🌟 New Example
🐛 Bugfixes
-
@phenomic/reason
: Bring bsconfig.json to the npm package,
by @bloodyowl, reported by @bloodyowl (in #1171) and @rickyvetter
So now we can use reason package without any copy/paste/hack 🙃
Note that this package is going to be exploded as apreset-reason
that will containsplugin-renderer-reason
+plugin-renderer-reason-react
in next release. -
@phenomic/api-client
: correctly handle url without path (and protect path from query by id),
by @MoOx
👍 Improvements
-
@phenomic/core
: Display a warning if no html files are generated during static build,
by @MoOx, requested by @xuopled (in #1166) -
@phenomic/core
+@phenomic/api-client
: Makepath
parameter for query optional,
by @MoOx (in #1173)
v1.0.0 Super Alpha XI
💥 Minor breaking change
@phenomic/plugin-bundler-webpack
: upgrade to webpack@^3.0.0,
by @MoOx, reported (in #1078)
This should not create you any issue and upgrade should be transparent for you.
🐛 Bugfix
1.0.0 Super Alpha X
Because it’s a trend to skip version 9, we are bumping from alpha.8 to alpha.10 (pronounced “alpha X”).
😍 Phenomic was already React 16 ready thanks to our architecture. We are now fully compatible (= no warnings)
💥 2 minor breaking changes
-
@phenomic/reason
:Link
componenttoURL
prop is nowhref
,
by @MoOx -
@phenomic/plugin-transform-markdown
: Anchor that was present by default have been removed by default. See new feature at the end 😉
🐛 Bugfixes
-
@phenomic/api-client
: Fix encoding issue for query with path + id,
by @MoOx, reported by @ArthurClemens & @tleef (in #1168) -
@phenomic/plugin-bundler-webpack
: react-helmetrenderStatic()
now works as expected,
by @MoOx, reported by @ArthurClemens & @hellais (in #1167) -
@phenomic/reason
: pass all props to Link component,
by @MoOx -
@phenomic/plugin-bundler-webpack
: ensure full glamor & aphrodite static rendering compatibility out of the box,
by @MoOx, reported by @owenhoskins
👍 Improvements
-
@phenomic/plugin-renderer-react
: React 16 compatibility,
by @MoOx, helped by @JulienPradet -
@phenomic/babel-preset
: babel-preset-react-app to latest version,
by @MoOx, reported by @DominikGuzei (in #1162) -
@phenomic/plugin-renderer-react
: avoid some warnings about some props that Link component pass to a tag,
by @MoOx
✨ New (AWESOME) feature 🔥
@phenomic/plugin-transform-markdown
: allow custom markup,
by @MoOx, reported by @MoOx, @bherila, @daine and @jfjessup (in #817 & #1098)
This plugin now use unified directly instead of remark so we can mix remark with rehype to allow custom markup.
This will open up usage of custom react components when rendering markdown tree with a custom mapping.
Anchor that was present by default have been removed. We will introduce in next release a support for custom plugin passed from the config to add it back.
v1.0.0-alpha.8
🎉 No breaking changes 🎉
A simple bug fix on an edge case for paginated queries + a fix for an undocumented component :)
-
@phenomic/core:
Fix "hasNextPage" & "next" reference for a paginated query when a page ends with the last item of the entire collection, by @MoOx, reported by @ArthurClemens -
@phenomic/plugin-renderer-react:
Fix activeStyle for Link component (+ refactoring for internal/external links management), by @MoOx
v1.0.0-alpha.7
🎉 No breaking changes 🎉
Only fixes & improvements!
-
@phenomic/core
: Fix encoding issue for static generated API files, by @MoOx, reported by @ArthurClemens in #1158 -
@phenomic/plugin-bundler-webpack
: Fix react-native-web StyleSheet pre-rendering (regression with 1.0.0-alpha-6 changes), by @MoOx -
@phenomic/plugin-renderer-react
: Avoid unnecessary React warning in development, by @MoOx, reported by @DominikGuzei in #1155 -
@phenomic/core
: Add a explicit message if dev server is running when you try to build static version, by @MoOx, reported by @ArthurClemens in #1156 -
@phenomic/plugin-renderer-react
: Fix incorrect class name(s) rendering for Link component, by @MoOx, reported by @DominikGuzei in #1154 -
@phenomic/plugin-renderer-react
: Improve Link behavior for better accessibility (respect modifiers, target + keyboard navigation), by @MoOxThe Link component (by default used to navigate between content (eg: markdown) link) has been improved:
- does not use directly react-router Link, but instead just push the url in the navigation history (which is supported by react-router)
- respect target=_blank original behavior
- respect keyboard modifiers original behaviors (eg: cmd+click, alt+click etc)
- work better with keyboard navigation (enter key) has it's now triggering client side navigation!
This component can receive onClick and onPress callback that can trigger a preventDefault() to avoid the original behavior of the component if necessary.
v1.0.0-alpha.6
We have made some tiny breaking changes (easy to update) for a better future (to give you more power (eg: query for sub-folder & choice for whatever css-in-js solution you want :)
We have added plenty of examples. Be sure to take a look!
FYI, those examples will always be up to date with Phenomic API as those are automatically tested in our full test suit (with some assertions to check the result)!
tl;dr
💥 Breaking change
collection
concept has been replaced by a simplepath
.- Html component must be in its own file & offers controls for rendering of the HTML (eg: for CSS-in-JS static rendering), see details below.
- Some change simple have been made for API of render plugins (if you wrote one, let us know!).
✨ New features
- JS/CSS now have hashes in the filename to avoid caching issues.
- CSS files can now be easily injected in the Html.
- Some enhancements on webpack default config.
- React plugin now exports a function to render content as raw text (handy for meta description & similar)
Details
@phenomic/core
- 💥 Breaking change we changed a little renderer plugin API:
renderServer
becomesrenderStatic
renderHTML
is now hidden and replaced byrenderDevServer
method that accept assets (key: array of filenames) returned by build or injected byaddDevServerMiddlewares
in res.locals.assets
(@MoOx)
- 💥 Breaking change
collection
concept has been replaced by a simplepath
. You can just replace allcollection
in your query bypath
and it should work. What you are winning here is the ability to query using a sub-folder.
@phenomic/plugin-bundler-webpack
- Upgrade to webpack@^3.0.0. It's a bit faster on our website (28s vs 24s - Phenomic part is > 2s).
(#1137 - @MoOx) - Properly pass assets to the core (so CSS and JS files are known)
(@MoOx)
@phenomic/plugin-renderer-react
& @phenomic/preset-react-app
- 💥 Breaking change props passed to Html components are now components to render & not string.
This will allow people to wrap rendering (eg: so they can use whatever CSS-in-JS solutions).
Previously, a minimal Html
component was like
const Html = (props) =>
<html>
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body className="wrapper">
{props.body}
{props.state}
{props.script}
</body>
</html>;
Now it should be
const Html = ({ App, render }) => {
const { Main, State, Script, Style } = render(<App />);
// you have also an `assets` object if you want more control to renders js/css files
return (
<html>
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Style />
</head>
<body className="wrapper">
<Main />
<State />
<Script />
</body>
</html>
);
- A new
textRenderer
to convert page content to raw text is now export.
import {
createApp,
createContainer,
query,
BodyRenderer,
/***** I AM NEW *****/
textRenderer,
/********************/
} from "@phenomic/preset-react-app/lib/client";
// also available from "@phenomic/plugin-renderer-react/lib/client"
const BlogPost = ({ isLoading, page }) => (
<div>
{isLoading && "Loading..."}
{!isLoading &&
page.node && (
<article>
<Head>
<title>{page.node.title}</title>
/***** TRY ME *****/
<meta name="description" content={ textRenderer(page.node.body).slice(0, 150) + "…" } />
/******************/
</Head>
<h1>{page.node.title}</h1>
<BodyRenderer>{page.node.body}</BodyRenderer>
</article>
)}
{/* ... */}
</div>
);
0.21.2
v1.0.0-alpha.5
🎉 We added examples in examples/*
for react-app and reason-react-app.
We also have prepared a workflow to be able to quickly add more examples with
automated testing to prevent any kind of regressions.
Documentation is also covered by tests to prevent regressions.
Stay tuned for more examples. And do not hesitate to add some!
Do not hesitate to contact us if you want to contribute as our CONTRIBUTING.md is still a WIP :)
tl;dr;
- Tons of fixes in Getting Started
- Fixed & improved pagination and static rendering
- Examples for preset-react-app & reason
- Client side navigation enabled for markdown link
- "Various fixes" 🙃
Notable fixes & improvements
@phenomic/core
-
Fix static rendering for collection items (when no by param is used)
(#1114 - @MoOx) -
Fix pagination
previous
that was incorrect for second page
(@MoOx) -
Fix
order: 'asc'
for queries
(@MoOx) -
Pre-rendering now handle ALL possible pages for pagination.
This is a huge step forward as we now have a real immutable pagination that
opens a number of possibilities like infinite scrolling mixed with immutable
pages urls!
(@MoOx, @bloodyowl)
@phenomic/plugin-public-assets
- Prevent infinite static build step if no "public" folder exist
(@MoOx)
@phenomic/plugin-bundler-webpack
@phenomic/plugin-renderer-react
- New
Link
component that you should use instead of react-router v3 one.
It enables client side routing for markdown by default and
also handle relative and external urls unlike react-router v3Link
.
(@MoOx)
@phenomic/preset-react-app
@phenomic/reason
- Various mysterious updates by @bloodyowl.
Please refer to the examples/reason-react-app until API is stable & doc is complete.
v1.0.0-alpha.4
fix(@phenomic/core): support static rendering of "by" parameters for main (first) collection
collection
params in routes is now useless as we consider the first collection of the queries as the main query.
(@MoOx)
feat(@phenomic/cli): add a default babel config
(#1071 - @MoOx)
feat(@phenomic/plugin-renderer-react): render path that finish with html as is
(#1106 - @MoOx)
fix(@phenomic/plugin-renderer-react): Prevent our react context usage from colliding with redux
(#1086 - @bloodyowl)