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

Bug 1894945 - new Glean.js docs platform MVP #1920

Merged
merged 49 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
607e6fb
init docs astro/starlight project
rosahbruno Mar 27, 2024
ccd4ce6
add gleanjs as a dependency
rosahbruno Apr 1, 2024
0979b49
documentation skeleton
rosahbruno Apr 1, 2024
3a071fb
automatic page loads
rosahbruno Apr 1, 2024
1392d0d
add @astro/svelte for custom components
rosahbruno Apr 1, 2024
d092841
Remove unnecessary pages
rosahbruno Apr 4, 2024
607d820
target=_blank link for metrics page
rosahbruno Apr 4, 2024
d3fa82d
do not collect telemetry by default on /playground
rosahbruno Apr 8, 2024
b51375c
sessions page
rosahbruno Apr 15, 2024
002544e
remove unnecessary pages
rosahbruno Apr 15, 2024
d8902a8
add toast library
rosahbruno Apr 15, 2024
d167b6b
redo the debugging section
rosahbruno Apr 17, 2024
1882d7d
remove redundant overview page
rosahbruno Apr 17, 2024
cc07487
move auto instrumentation to its own section
rosahbruno Apr 17, 2024
06f0cc6
platforms
rosahbruno Apr 17, 2024
c718434
move /guides to /getting_started
rosahbruno Apr 17, 2024
2613bd3
rewrite click events
rosahbruno Apr 17, 2024
d27a234
rewrite page load events
rosahbruno Apr 17, 2024
63c8591
interactive playground
rosahbruno Apr 22, 2024
8d3546e
project config
rosahbruno Apr 22, 2024
19f8cf4
uploaders
rosahbruno Apr 22, 2024
7dad442
ts-ignore to fix build errors
rosahbruno Apr 22, 2024
45c0f3f
update initialize toast to be 5 seconds
rosahbruno Apr 22, 2024
bb5bfa0
homepage
rosahbruno Apr 22, 2024
80f92f9
update README
rosahbruno Apr 22, 2024
1b4ab39
improved code config generator
rosahbruno Apr 22, 2024
8b249b6
comment out why page for now
rosahbruno Apr 22, 2024
918de7a
fix spelling + remove unused pages
rosahbruno Apr 22, 2024
874f99b
fix playground initialize issue
rosahbruno Apr 25, 2024
ba83cc3
update debugging options code sample
rosahbruno Apr 25, 2024
203ff68
installation
rosahbruno Apr 25, 2024
dbc36df
set up
rosahbruno Apr 25, 2024
f8d9f27
clean up descriptions
rosahbruno Apr 25, 2024
9bdd2c1
update astro config navigation
rosahbruno Apr 25, 2024
7ab4901
add missing blank EOF line
rosahbruno May 2, 2024
d036593
remove auto instrumentation why page
rosahbruno May 2, 2024
5ceec32
add lock to roadmap link
rosahbruno May 3, 2024
b3d2c8f
remove houston.webp
rosahbruno May 3, 2024
6635e15
fix index description
rosahbruno May 3, 2024
8baecb1
EOF blank line in documentation/tsconfig.json
rosahbruno May 3, 2024
e98ec05
rename clearSessionStorage func to resetGlean
rosahbruno May 3, 2024
1ede109
link to header info in Glean book
rosahbruno May 3, 2024
43fa08d
update wording around supporting deprecated platforms
rosahbruno May 3, 2024
da3d93a
update demo real-time data description
rosahbruno May 3, 2024
684cbad
remove unncessary `is:global` directive from `style` tag
rosahbruno May 3, 2024
5f789fe
remove alternative wording from manual event APIs
rosahbruno May 3, 2024
715976e
add optional chaining when reading from sessionStorage
rosahbruno May 3, 2024
d5add7e
add extra md space in sessions
rosahbruno May 3, 2024
b9d9157
add Glean image assets
rosahbruno May 3, 2024
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
14 changes: 14 additions & 0 deletions .dictionary
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
personal_ws-1.1 en 82
API's
APIs
Astro
BUGFIX
BrowserStack
CLI
Expand All @@ -17,14 +18,18 @@ JSDoc
JWK
LocalStorage
MPL
Nodejs
Nextjs
PingType
PlatformInfo
Programmatically
QML
QuantityMetricType
README
SDK
SDK's
SDKs
SPAs
TODO
TimespanMetricType
TypeScript
Expand All @@ -45,10 +50,13 @@ config
datetime
deserialize
deserializing
dev
dexter
enqueued
enum
dashboarding
falsy
favicons
firefox
getters
gzip
Expand All @@ -61,20 +69,26 @@ js
json
linter
linters
localStorage
md
mdroettboom
mozilla
npm
pre
prerelease
queueing
runtime
schemas
sendbeacon
sendBeacon
sessionStorage
setRawNanos
setUploadEnabled
ssr
timespan
travis
unminified
uploadEnabled
uploader
uploaders
url
Expand Down
21 changes: 21 additions & 0 deletions documentation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/

# dependencies
node_modules/

# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*


# environment variables
.env
.env.production

# macOS-specific files
.DS_Store
rosahbruno marked this conversation as resolved.
Show resolved Hide resolved
4 changes: 4 additions & 0 deletions documentation/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
11 changes: 11 additions & 0 deletions documentation/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
rosahbruno marked this conversation as resolved.
Show resolved Hide resolved
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
41 changes: 41 additions & 0 deletions documentation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Glean.js docs

Built with [Astro](https://astro.build/) and [Starlight](https://starlight.astro.build/).

This project houses all Glean.js documentation. All custom UI components are built using Svelte.

## 🚀 Project Structure

```
.
├── public/
├── src/
│ ├── assets/
│ ├── components/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```

Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
rosahbruno marked this conversation as resolved.
Show resolved Hide resolved

Images can be added to `src/assets/` and embedded in Markdown with a relative link.

Static assets, like favicons, can be placed in the `public/` directory.

## 🧞 Commands

All commands are run from the root of the project, from a terminal:

| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
81 changes: 81 additions & 0 deletions documentation/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';

import svelte from "@astrojs/svelte";

// https://astro.build/config
export default defineConfig({
integrations: [starlight({
title: 'Glean.js',
components: {
// Override the default `SocialIcons` component.
PageTitle: './src/components/CustomPageTitle.astro'
},
social: {
github: 'https://github.com/mozilla/glean.js'
},
sidebar: [{
label: 'Introduction',
items: [
// Each item here is one entry in the navigation menu.
{
label: 'Overview',
link: '/'
}, {
label: 'Interactive playground',
link: '/playground'
}, {
label: 'Roadmap',
link: 'https://docs.google.com/document/d/1vqu9O9VRGRiuptQbGPY5UX-cH2gkUSVj4EoZizQtHGM/edit#heading=h.m18zbbjlaigo',
rosahbruno marked this conversation as resolved.
Show resolved Hide resolved
attrs: {
target: '_blank',
style: 'font-style: italic'
}
}]
}, {
label: 'Getting Started',
items: [{
label: 'Platforms',
link: '/getting_started/platforms'
}, {
label: 'Installation',
link: '/getting_started/installation'
}, {
label: 'Setting up Glean',
link: '/getting_started/setup'
}, {
label: 'Integration guide',
link: 'https://mozilla.github.io/glean/book/user/adding-glean-to-your-project/index.html',
attrs: {
target: '_blank',
style: 'font-style: italic'
}
}]
}, {
label: 'Automatic Events',
items: [{
label: 'Page load events',
link: '/automatic_instrumentation/page_load_events'
}, {
label: 'Click events',
link: '/automatic_instrumentation/click_events'
}]
}, {
label: 'Debugging',
items: [{
label: 'Options',
link: '/debugging/options'
}, {
label: 'Browser debugging',
link: '/debugging/browser'
}]
}, {
// This auto generates a list for all md files in the
// `/documentation/src/content/docs/reference` directory.
label: 'Reference',
autogenerate: {
directory: 'reference'
}
}]
}), svelte()]
});
Loading