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

Docusaurus upgrade #910

Merged
merged 46 commits into from
Mar 3, 2023
Merged

Docusaurus upgrade #910

merged 46 commits into from
Mar 3, 2023

Conversation

robmoffat
Copy link
Member

@robmoffat robmoffat commented Feb 22, 2023

Fixing

Major rework was required. Please review the preview carefully.

@netlify
Copy link

netlify bot commented Feb 22, 2023

Deploy Preview for lambent-kulfi-cf51a7 ready!

Name Link
🔨 Latest commit bb6a273
🔍 Latest deploy log https://app.netlify.com/sites/lambent-kulfi-cf51a7/deploys/6401f9e1cb7b4a00095f0770
😎 Deploy Preview https://deploy-preview-910--lambent-kulfi-cf51a7.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@robmoffat
Copy link
Member Author

robmoffat commented Feb 22, 2023

Ignore the above preview - it requires some changes to netlify.
You can review here: https://deploy-preview-7--luxury-banoffee-9d872a.netlify.app

@robmoffat robmoffat requested review from a team February 22, 2023 17:06
@julianna-ciq
Copy link
Contributor

Thoughts on content

Page: /docs/references
all of the references include URL's in square brackets, but they aren't actual links. Like this:

Apache 2.0 open-source license, [https://www.apache.org/licenses/LICENSE-2.0].

I assume this aesthetic was intentional, but it might be nice if they were still links that you could actually click on.


Page: /docs/supported-platforms

I like the aesthetic of that code block.

I think that having separate code blocks for npm, yarn, and pnpm works just fine. That said, I just wanted to let you know that I've seen alternatives to it that you might like. On the docusaurus page, they have tabs for npm/yarn/pnpm, so that you can select the code that works for your package manager. I believe that uses npm2yarn


Page: /docs/api/spec#recommended-user-channel-set
You have a blockquote note. If you haven't tried the admonitions before, you may want to see if those also work for you. The syntax would be:

:::note
Future versions of the FDC3 Standard may support connections between desktop agents, where differing user channel sets may cause user experience issues.
:::

Page: /docs/api/ref/DesktopAgent#addintentlistener

Personal preference, but I think using an ordered list might break up this paragraph better:

The Desktop Agent MUST reject the promise returned by the getResult() function of IntentResolution if any of the following is true:

  1. the intent handling function's returned promise rejects
  2. the intent handling function doesn't return a promise
  3. the returned promise resolves to an invalid type.

Sometimes MUST and SHOULD are bolded, and sometimes they aren't. Is there a style guide to recommend whether or not that text should be bolded?

--

Use cases: Why are the use cases numbered and numbers are skipped? I feel like you're just calling attention to a lack of use cases 6, 7, 8, 11, 12, and 14...

@robmoffat
Copy link
Member Author

robmoffat commented Mar 1, 2023

Hi @julianna-ciq,

This is good analysis, but I think it's worth pointing out that I've only really done the change from Docusaurus v1-> v2, so a lot of the stuff you're commenting on is actually things I haven't changed!

Problem is, lots of files have moved locations, so the GitHub diff looks like I've changed everything.

For matters around the actual contents of the documents, @kriswest is probably your man.

@kriswest
Copy link
Contributor

kriswest commented Mar 1, 2023

I will be most happy to approve any proposed layout improvements that don't change the meaning of the standard. I burnt myself out on editing somewhat last year, but really hope to get back to it post this upgrade. In some cases, the things @julianna-ciq is calling out are v2 features we can now use that we couldn't before or that have changed, possibly the callouts and admonitions for example.

Re: use-cases: before my time, but I think they kept proposal numbers and so those that were not accepted or later superseded are missing. We haven't done anything more than retain the use-cases since FDC3 1.0 or 1.1 I think...

Copy link
Contributor

@julianna-ciq julianna-ciq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, these comments, plus my changes in PR #919 should address all outstanding console errors and broken links that I saw.

Comment on lines +18 to +31
return <div class={styles.conformanceShowcase}>
{
relevant.map(c => {
return (
<div className={styles.conformanceShowcaseItem}>
<div class={styles.conformanceImage}>
<img src={c.conf.image} alt={c.conf.title} title={c.conf.title} />
</div>
<div class={styles.conformanceText}>
<a href={c.conf.infoLink}><h3>{c.conf.title}</h3></a><ul>
{
c.badge.items.map(item => {
return (<li class={styles.conformanceItem}>
<p>{item.text} { (item.link) ? <em><a href={item.link}>More Details</a></em> :"" }</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return <div class={styles.conformanceShowcase}>
{
relevant.map(c => {
return (
<div className={styles.conformanceShowcaseItem}>
<div class={styles.conformanceImage}>
<img src={c.conf.image} alt={c.conf.title} title={c.conf.title} />
</div>
<div class={styles.conformanceText}>
<a href={c.conf.infoLink}><h3>{c.conf.title}</h3></a><ul>
{
c.badge.items.map(item => {
return (<li class={styles.conformanceItem}>
<p>{item.text} { (item.link) ? <em><a href={item.link}>More Details</a></em> :"" }</p>
return <div className={styles.conformanceShowcase}>
{
relevant.map((c, index) => {
return (
<div className={styles.conformanceShowcaseItem} key={`showcase-item-${index}`}>
<div className={styles.conformanceImage}>
<img src={c.conf.image} alt={c.conf.title} title={c.conf.title} />
</div>
<div className={styles.conformanceText}>
<a href={c.conf.infoLink}><h3>{c.conf.title}</h3></a><ul>
{
c.badge.items.map((item, badgeIndex) => {
return (<li className={styles.conformanceItem} key={`badge-item-${badgeIndex}`}>
<p>{item.text} { item.link && <em><a href={item.link}>More Details</a></em>}</p>

There were some console errors on this page around the use of class instead of className and around not using keys where necessary.

I have tested this suggestion, and it fixes the console errors.

Comment on lines +8 to +9
items.map(sl =>
<div className="blockElement fourByGridBlock">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
items.map(sl =>
<div className="blockElement fourByGridBlock">
items.map((sl, index) =>
<div className="blockElement fourByGridBlock" key={index}>

There were console errors around the fact that this DIV didn't have the necessary key prop. I have tested this suggestion, and it addresses the errors.

<div className="conformance-badge"><img src={c.src} /></div>
<div className="conformance-text"><ul>
{
c.items.map(ti => <li key={ti.link}>{ti.text} { ti.link ? <a className="conformance-details" href={ti.link}>details</a> : "" }</li>)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
c.items.map(ti => <li key={ti.link}>{ti.text} { ti.link ? <a className="conformance-details" href={ti.link}>details</a> : "" }</li>)
c.items.map(ti => <li key={ti.text}>{ti.text} { ti.link ? <a className="conformance-details" href={ti.link}>details</a> : "" }</li>)

There were errors around this LI elements key prop not being unique. When the key was based on a link (URL), it assumed all of the conformance details would point to different URL's; however several links on this page all point to the same press release.

Since all of the text on this page is different, I've changed the key to be based on the text. In the event that multiple details links will have the same link text, the page will throw errors again.

I have tested the suggested change.

@@ -0,0 +1,160 @@
import Layout from "@theme/Layout";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are console errors on this page for the following changes:

  • All uses of class should be className
  • All uses of colspan should be colSpan, and rowspan should be rowSpan
  • All the TR tags (not under THEAD) should be children of a TBODY element.

@robmoffat
Copy link
Member Author

now with improved dark mode. something broke the preview though:

89
> copy-explained
[90](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:91)
> del-cli static/toolbox/fdc3-explained && cpy ./fdc3-explained ../website/static/toolbox --parents  --cwd=../toolbox
[91](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:92)

[92](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:93)

[93](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:94)
> build
[94](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:95)
> docusaurus build
[95](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:96)

[96](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:97)
[INFO] [en] Creating an optimized production build...
[97](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:98)
Warning:  Cannot infer the update date for some files, as they are not tracked by git.
[98](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:99)
[info] [webpackbar] Compiling Client
[99](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:100)
[info] [webpackbar] Compiling Server
[100](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:101)
node:internal/event_target:969
[101](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:102)
  process.nextTick(() => { throw err; });
[102](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:103)
                           ^
[103](https://github.com/robmoffat/FDC3/actions/runs/4313148735/jobs/7524583880#step:7:104)

@robmoffat robmoffat requested a review from kriswest March 3, 2023 11:58
@robmoffat
Copy link
Member Author

@kriswest and @julianna-ciq please review

I've fixed all the remaining broken links and the Netlify preview is now working.

I'm assuming all the items of conversation above have been fixed by your PR into this one?

thanks!

@kriswest
Copy link
Contributor

kriswest commented Mar 3, 2023 via email

robmoffat and others added 3 commits March 3, 2023 13:44
Co-authored-by: julianna-ciq <74684272+julianna-ciq@users.noreply.github.com>
Co-authored-by: julianna-ciq <74684272+julianna-ciq@users.noreply.github.com>
Co-authored-by: julianna-ciq <74684272+julianna-ciq@users.noreply.github.com>
Copy link
Contributor

@kriswest kriswest left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - side issue raised for content improvements

@robmoffat robmoffat merged commit 129f741 into master Mar 3, 2023
@kriswest
Copy link
Contributor

kriswest commented Mar 3, 2023

@robmoffat It doesn't look like this has deployed... See https://github.com/finos/FDC3/actions/runs/4324087758

The github action for deploying it probably also needs updating.

@robmoffat
Copy link
Member Author

robmoffat commented Mar 6, 2023 via email

@kriswest
Copy link
Contributor

kriswest commented Mar 6, 2023 via email

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.

3 participants