1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
Commit Graph

33 Commits

Author SHA1 Message Date
Thomas Heartman
0e4734af38
docs: Update docs with new constraint availability (#2113)
* docs: fix duplicated image.

* docs: add announcement banner for constraints

* docs: style announcement bar via CSS

* docs: update doc availability notices

* docs: remove commented-out announcement bar code
2022-10-04 14:13:52 +02:00
Thomas Heartman
2d04bd9ea2
Add OpenAPI docs (#1391) (#2066)
## What

This PR (finally 🎉) adds generated OpenAPI docs to the official Unleash documentation. In addition to generating docs when things get merged to main, it also pushes new doc updates every day at 12:00 AM (cron `@daily`).

## Why

Now that we have OpenAPI'd all the things, we can finally start using it. This will allow us to remove hand-written api docs from the documentation and should make sure everything is always kept up to date.

### Generating from us-hosted (Unleash enterprise)

Unleash has several different versions (open source, pro, enterprise). The versions do not necessarily have the exact same api surface. In fact, the enterprise version has a few endpoints that open source does not.

Because we want to have _all_ endpoints listed in the documentation we need to generated the docs from an enterprise spec. Which brings us into the next point:

### The need for scheduled jobs

Regarding the daily scheduled tasks to update the documentation: why do we need that?

The docs are generated from the tip of the main branch. For most of the docs, this is good and something that we want. However, because the OpenAPI docs are generated from the enterprise edition, it _will not be in sync_ with the open source main branch.

Also, we probably do not want the docs to list the current bleeding edge api changes. Instead, we should prefer to use the latest enterprise release (roughly). However, because we don't get notified when this version is released and deployed, we'll instead run the API generation on a daily cadence.

This isn't the perfect solution, but it's simple and gets us 80% of the way there. More intricate solutions can be set up later.

## How

-   By adding a scheduled workflow to the generate docs config.
-   By adding .gitignore entries for the generated files

There's also some minor changes in styling etc.

## Dependencies

This is dependent on the changes introduced in #2062 having propagated to the enterprise release, which will probably not be for another week or so.

## Discussion

What should the API reference docs url be? I've set it to be `/reference/api/unleash/*` for now, but I'm on the fence about whether it should be `apis` or `api` in there. I also want to get the proxy and other APIs in there as we grow.

-------

## Commits

* docs: style openapi operation buttons

* docs: minor operation badge adjustments

* docs: use permalink to css snippet i copied

* docs: ignore files related to openapi generation

* docs: re-enable openapi docs

* Docs(#1391): prep for integration

* docs(#1391): run docs generation daily

* docs(#1391): add generation step to doc prs too

* docs(#1391): use the US hosted instance to generate docs

* docs(#1391): move doc generation into build command

* docs(#1391): use `/reference/api/*` instead of `/reference/apis/*`
2022-09-19 14:50:24 +02:00
Thomas Heartman
9448461aaa
docs: prep to add OpenAPI spec to Unleash docs (#1907)
* Docs: start experimenting with OpenAPI and docusaurus

* Docs: add docusaurus-theme-openapi-docs pkg

* Wip: current status

* Docs: Add 'docusaurus-plugin-api-docs'

* Move openapi into own sidebar; generate from localhost

* Chore: Update docusaurus plugin for OpenAPI

* Add website/yarn.lock to git

* Fix: fix CSS warning by using flex-end instead of end

* docs: make openapi generated code work again

* docs: make tags work properly with openapi sidebar

* Docs/chore: update OpenAPI tag scheme.

Add a whole bunch of new tags to make it easier to understand
available tags in OpenAPI.

* docs: point to new openapi docs from old api docs

* docs: typo

* Docs:  link restructure

* docs: add operation indicators to openapi docs

* docs: change badge color for operations

* docs: update openapi-docs package

It now sorts tags the same as the schema

* docs: pluralize APIs in slug

* docs: update links to generated api docs

* docs: update openapi snapshot tests with new tags

* docs: conditionally load spec from localhost or from file

* docs: Remove changes relating to immediate switchover

* refactor: rename types; extract into separate file

* docs: fix api doc links
2022-08-12 11:37:57 +02:00
Thomas Heartman
532f0cb634 fix: explicitly set background for the light theme
the default is for it to be transparent, which causes issues when
you're overlaying components with the default background color.
2022-02-25 16:39:25 +01:00
Thomas Heartman
4a795966d1 docs: change primary color for light theme to unleash purple 2022-02-25 13:32:52 +01:00
Thomas Heartman
a6191f5ab8 feat: rough style first question page of feedback component. 2022-02-25 12:57:13 +01:00
Thomas Heartman
39f4d73d59 feat: add basic (sorta styled) first feedback screen 2022-02-24 17:42:53 +01:00
Thomas Heartman
63cd0d229e docs: adjust primary color scale, fix search dropdown a11y issues
This changes the darker end of the primary color scale to make it even
darker. This means that at the lower end of the scale, white text also
gets enough contrast to be accessible.

For the record: these variables do not seem to be in use anywhere else
in the code base (based on a text search), so it shouldn't affect any
other bits or pieces.
2022-02-14 11:43:05 +01:00
Thomas Heartman
17d32f5e43 fix: don't apply extra image styling to images outside the main
Without this modifier, the border, background color, etc, also applies
to logos in the header and footer, and that's not what we want.
2022-02-10 16:42:11 +01:00
Thomas Heartman
fe69c1d9ef docs(chore): Use ifm variable for border width. 2022-02-09 13:44:58 +01:00
Thomas Heartman
986d628faa docs(a11y): fix issues with transparent pngs; add borders, centering 2022-02-09 13:44:58 +01:00
Thomas Heartman
d0023f615b docs(a11y): use a purple color for primary theme color 2022-02-09 13:44:58 +01:00
Thomas Heartman
7ee4e12a05 docs(a11y): dark mode fix contrast in sidebar and with vid comp
This commit introduces a new primary color gradient palette to replace the
dark / mossy green that we use in the light theme. It's got a very
small range, so we should probably expand on it in the future, but for
now it'll do a _lot_ better than it did previously.
2022-02-09 13:44:58 +01:00
Thomas Heartman
52e85ab555 docs(a11y): move light-specific theme changes to 'light-theme' css 2022-02-09 13:44:58 +01:00
Thomas Heartman
f7301ef937 docs(a11y): fix contrast issues with dark theme link color.
New contrast is 7.99 (AAA).
2022-02-09 13:44:58 +01:00
Thomas Heartman
962928501d docs: hide 'back-to-main-menu' entry in narrow menu
This hides the 'back to main menu' button from the narrowed site menu.
There is no main menu to speak of, so having it take you back to
'unleash enterprise' and the GitHub icon seems unnecessary.
2022-02-07 13:54:52 +01:00
Thomas Heartman
e4b21a3125 chore: make docs sidebar hover and active color same unleash grey. 2022-01-27 13:05:27 +01:00
Thomas Heartman
c14f52c3ca docs: finish v1 of the video content element. 2022-01-27 12:48:39 +01:00
Thomas Heartman
ac7c9bb2df chore: rename unleash purple color variable to align with other vars 2022-01-26 13:53:21 +01:00
Thomas Heartman
2c318546b6 docs: remove unnecessary wrapping divs. 2022-01-26 13:52:17 +01:00
Thomas Heartman
a853de45ce docs: size video wrapper elements correctly 2022-01-26 13:52:17 +01:00
Thomas Heartman
c373db40bb docs: make the video content callout Unleash gray. 2022-01-26 13:52:17 +01:00
Thomas Heartman
2a6504e581 docs: use grid for videos in smaller formats. 2022-01-26 13:52:16 +01:00
Thomas Heartman
132cba741c docs: add media query to control for smaller sizes. 2022-01-26 13:51:44 +01:00
Thomas Heartman
2d56e07d3d docs: styling changes to the videos component 2022-01-26 13:51:44 +01:00
Thomas Heartman
2259cc4e68 docs: add initial video component idea (+ cq polyfill)
note: polyfill is currently broken for some reason 🤷
2022-01-26 13:51:44 +01:00
Thomas Heartman
e697e146d6 chore(format): run prettier on the custom css stylesheet 2022-01-26 11:57:52 +01:00
Thomas Heartman
a78f4bd4c4 fix: remove unused style 2022-01-25 12:22:25 +01:00
Thomas Heartman
1b48bc0a9e docs: sidebar markers // use vertical pipes instead. 2022-01-25 12:22:25 +01:00
Thomas Heartman
fe17c4f062 docs: add purple squares to the top level categories. 2022-01-25 12:22:24 +01:00
Thomas Heartman
4899eff20e fix(docs/a11y): fix lack of contrast in on hovered links in footer
This commit changes the hover color of links in the footer to keep it
accessible.

The color will be the exact same as the un-hovered version. This is in
line with the other links in the documentation. The links _do_ get
underlined when hovered, so there is still a visual distinction
between the states.

I've added the variable in the `footer` section instead of in `:root`
because the variable I assign it to (`--ifm-footer-link-color`) gets
overridden closer to the footer, so if you set it in `:root`, you end
up with the wrong value.

addresses and closes https://github.com/Unleash/unleash.github.io/issues/8
2022-01-18 11:46:32 +01:00
Thomas Heartman
a6f9c4f621 fix: use the Unleash purple for links / increase contrast
This increases the contrast from 3.42 to above 4.5, in compliance with
the AA standard.
2022-01-17 15:51:15 +01:00
Ivar Conradi Østhus
ffec4f6342 fix: rename websitev2 to website 2021-10-26 11:25:19 +02:00