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

Documentation integration #42

Merged
merged 34 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d246620
documentation-integration
KirillDogadin-std Apr 5, 2023
1bce594
add generation script
KirillDogadin-std Apr 6, 2023
d307d40
lint
KirillDogadin-std Apr 6, 2023
d7e1cc8
add command for doc gen
KirillDogadin-std Apr 6, 2023
b311227
embed the docs into the frontend
KirillDogadin-std Apr 6, 2023
a11ec38
lint
KirillDogadin-std Apr 6, 2023
8b93c67
extend frontend readme
KirillDogadin-std Apr 6, 2023
1ed85a1
better style
KirillDogadin-std Apr 6, 2023
cbb3d59
improve doc generations
KirillDogadin-std Apr 6, 2023
1dced10
basic stable
KirillDogadin-std Apr 6, 2023
d4beb5e
dont gen toc
KirillDogadin-std Apr 6, 2023
d4f70f4
bonk, toc has style and swag
KirillDogadin-std Apr 6, 2023
04dbe16
a bit nicer
KirillDogadin-std Apr 7, 2023
9fbfdb5
move logic to docs from component
KirillDogadin-std Apr 7, 2023
ffdbb6d
responsivier
KirillDogadin-std Apr 11, 2023
f6cea25
Merge branch 'main' into doc-integration
KirillDogadin-std Apr 11, 2023
49f8052
rm files
KirillDogadin-std Apr 12, 2023
6298d38
micro polish
KirillDogadin-std Apr 12, 2023
f3cebb2
simplier readme
KirillDogadin-std Apr 12, 2023
7f43b06
as above
KirillDogadin-std Apr 12, 2023
1206c7d
rename npm command
KirillDogadin-std Apr 12, 2023
c2ed5d6
rm mkdirp dep
KirillDogadin-std Apr 12, 2023
9d0958f
rm vueuse dep
KirillDogadin-std Apr 12, 2023
b4e5b97
lint
KirillDogadin-std Apr 12, 2023
25350a9
Merge branch 'main' into doc-integration
KirillDogadin-std Apr 13, 2023
bfc2249
update kube
KirillDogadin-std Apr 13, 2023
e5b78d1
Merge branch 'main' into doc-integration
KirillDogadin-std Apr 13, 2023
e1a5a9f
regen package lock
KirillDogadin-std Apr 13, 2023
809fc9a
fix @huntersofbook/naive-ui-nuxt to 0.5.1
valiafetisov Apr 13, 2023
da5e2dc
fix default api endpoint
KirillDogadin-std Apr 13, 2023
2744dd2
cleanup styles and logic
valiafetisov Apr 14, 2023
4f7110a
Merge branch 'doc-integration' of github.com:makerdao-ses/switchboard…
valiafetisov Apr 14, 2023
75e868a
fix
valiafetisov Apr 14, 2023
d48cae2
fix width
valiafetisov Apr 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ You can build application for production using `npm run build` and then locally
## Health endpoint

Endpoint available at `/healthz` path. Provides response if frontend is currently running.

## Documentation page

One of the frontend's features is displaying the documentation about document model.
The documentation is provided to the service externally as raw typedoc output in markdown format.

To display the documentation on the frontend the provided data has to be processed and represented in the form of a single file.

TODO: add the precise process in separate issue
4 changes: 2 additions & 2 deletions frontend/app.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<NMessageProvider>
<div class="h-screen flex flex-col">
<div class="h-screen flex flex-col w-full">
<LayoutTheHeader :user="user" :is-authorized="isAuthorized" class="flex-shrink-0 h-14 fixed top-0 z-10" />
<div class="flex-grow mt-14">
<div class="flex-grow mt-14 w-full">
<NuxtPage :user="user" />
</div>
</div>
Expand Down
38 changes: 38 additions & 0 deletions frontend/components/doc/TableOfContents.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<script setup lang="ts">
const props = defineProps<{
tocLinks: Array<{
id: string;
text: string;
children: { id: string; text: string }[];
valiafetisov marked this conversation as resolved.
Show resolved Hide resolved
}> | null;
}>()

defineEmits<{(e: 'scrollToId', id: string): void }>()
</script>

<template>
<nav>
<ul class="!p-0">
<li
v-for="{ id, text, children } in props.tocLinks"
:id="`toc-${id}`"
:key="id"
class="text-sm list-none"
>
<template v-if="text !== 'Table of contents'">
<a :href="`#${id}`" class="!text-neutral-800" @click="$emit('scrollToId', id)">{{ text }}</a>
<ul v-if="children" class="!p-0 ml-4 mt-1 mb-2 flex flex-col gap-2">
<li
v-for="{ id: childId, text: childText } in children"
:id="`toc-${childId}`"
:key="childId"
class="text-xs list-none ml-0 hover:underline"
>
<a :href="`#${childId}`" class="!text-neutral-700" @click="$emit('scrollToId', childId)">{{ childText }}</a>
</li>
</ul>
</template>
</li>
</ul>
</nav>
</template>
2 changes: 1 addition & 1 deletion frontend/components/layout/TheMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {

const links = [
{
id: '/',
id: '/documentation',
icon: DocumentText24Regular,
label: 'Documentation'
},
Expand Down
Loading