Skip to content

DOCS: Fix rendering of addon docs pages#706

Merged
bantic merged 1 commit intoAddepar:masterfrom
bantic:bantic/fix-docs-rendering-basic
Jul 11, 2019
Merged

DOCS: Fix rendering of addon docs pages#706
bantic merged 1 commit intoAddepar:masterfrom
bantic:bantic/fix-docs-rendering-basic

Conversation

@bantic
Copy link
Copy Markdown
Contributor

@bantic bantic commented Jul 10, 2019

  • Upgrade ember-cli-addon-docs and related devDeps
  • Remove @ember-decorators/argument devDep

Convert custom-cell and custom-header docs components to classic.
Fixes issue where the table-customization addon docs page would throw
errors at runtime related to the @argument decorator.

  • Restructure docs index and application templates

Add a nav.item for 'docs.index', otherwise ember-cli-addon-docs
hits an assertion and throws an error in local development when it tries
and fails to associate the currentURL ('/docs') with a known docs route.

Remove some private-api style= component props and errant spacer lis in
the nav. In newer ember-cli-addon-docs its styles are namespaced (under
docs-X classes), and the styling of the nav no longer looked correct.

  • Upgrade angle-bracket polyfill

Upgrade the polyfill to allow using <EmberTh::SortIndicator>
nested angle-bracket invocation style on the table-customization docs page.
Prior to this upgrade, the page would throw errors when visited.

Note that this does change the styling of the docs pages, due to the ember-cli-addon-docs upgrade:

Before (current published site):

Details

image

After:

Details

image

@bantic bantic requested review from cyril-sf and mixonic July 10, 2019 19:13
@bantic bantic added this to the Prepare for 2.0 release milestone Jul 10, 2019
 * Upgrade ember-cli-addon-docs and related devDeps
 * Remove @ember-decorators/argument devDep

Convert custom-cell and custom-header docs components to classic.
Fixes issue where the table-customization addon docs page would throw
errors at runtime related to the `@argument` decorator.

 * Restructure docs index and application templates

Add a `nav.item` for 'docs.index', otherwise ember-cli-addon-docs
hits an assertion and throws an error in local development when it tries
and fails to associate the currentURL ('/docs') with a known docs route.

Remove some private-api `style=` component props and errant spacer `li`s in
the nav. In newer ember-cli-addon-docs its styles are namespaced (under
`docs-X` classes), and the styling of the nav no longer looked correct.

 * Upgrade angle-bracket polyfill

Upgrade the polyfill to allow using `<EmberTh::SortIndicator>`
nested angle-bracket invocation style on the table-customization docs page.
Prior to this upgrade, the page would throw errors when visited.
@cyril-sf
Copy link
Copy Markdown
Contributor

It feels like the CSS on the left menu is still off based on the screenshot. Quickstart is still too close to INTRODUCTION for example. Not sure if it's blocking.

@bantic
Copy link
Copy Markdown
Contributor Author

bantic commented Jul 10, 2019

@cyril-sf You're right. I'm not sure how it happened but it looks like my screenshot was incorrect. This is a redo of the screenshot. The vertical spacing of the sidebar nav looks better here to me, do you agree?
image

<EmberTh::SortIndicator @columnMeta={{columnMeta}} />
Custom Header {{columnValue.name}}
<EmberTh::Resizehandle @columnMeta={{columnMeta}} />
{{columnValue.name}}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

By dropping Custom Header haven't you made this the same as the default header? 🤔

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess that's true, but this demo is to show that you can customize whether (and where) the sort-indicator and resize-handle appear. I'm not sure why it said "Custom Header" in the first place, probably copy-pasta'd here from another demo on this page. I think it is fine to remove. (fwiw, this demo was added after the last docs were published (ie v 2.0.0-beta.4), so it's never been seen "publicly").

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In #708 I add some additional docs and interactivity around this demo (namely, the ability to turn on/off the sort-indicator and resize-handle), so I think when that is merged this demo will be fully comprehensible without the "Custom Header" text.

Copy link
Copy Markdown
Member

@mixonic mixonic left a comment

Choose a reason for hiding this comment

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

Oh man, that default image 😬 Seems good, lets fix it in post.

@cyril-sf
Copy link
Copy Markdown
Contributor

The part we need to understand is that we are losing the API guide by dropping off ember-decorators/classes.

@bantic
Copy link
Copy Markdown
Contributor Author

bantic commented Jul 11, 2019

The part we need to understand is that we are losing the API guide by dropping off ember-decorators/classes.

Good point. The auto-generated API docs are indeed missing in this version. Added #712 for this.

@bantic bantic merged commit 929e619 into Addepar:master Jul 11, 2019
@bantic bantic deleted the bantic/fix-docs-rendering-basic branch July 11, 2019 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants