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

Feature/sidebar filters #515

Merged
merged 5 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Generate Build Files and Update version #
on:
push:
push:
branches:
- master

jobs:
yarn-build-and-update-version:
name: build
runs-on:
runs-on:
- ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
build:
runs-on: ubuntu-20.04
name: Build and push sphinx-nav-fiber image
name: Build and push sphinx-nav-fiber image
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
steps:
Expand Down Expand Up @@ -59,5 +59,3 @@ jobs:
--platform linux/amd64 \
--tag "${{ secrets.DOCKER_HUB_USER }}/sphinx-nav-fiber:latest" \
--output "type=registry" ./


236,198 changes: 231,785 additions & 4,413 deletions build/assets/index-337682da.js

Large diffs are not rendered by default.

1,146 changes: 1,145 additions & 1 deletion build/assets/index-381991a0.css

Large diffs are not rendered by default.

259 changes: 258 additions & 1 deletion build/assets/web-vitals-60d3425a.js
Original file line number Diff line number Diff line change
@@ -1 +1,258 @@
var m,l,C,T,f=function(t,e){return{name:t,value:e===void 0?-1:e,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},h=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if(t==="first-input"&&!("PerformanceEventTiming"in self))return;var i=new PerformanceObserver(function(a){return a.getEntries().map(e)});return i.observe({type:t,buffered:!0}),i}}catch{}},y=function(t,e){var i=function a(n){n.type!=="pagehide"&&document.visibilityState!=="hidden"||(t(n),e&&(removeEventListener("visibilitychange",a,!0),removeEventListener("pagehide",a,!0)))};addEventListener("visibilitychange",i,!0),addEventListener("pagehide",i,!0)},g=function(t){addEventListener("pageshow",function(e){e.persisted&&t(e)},!0)},v=function(t,e,i){var a;return function(n){e.value>=0&&(n||i)&&(e.delta=e.value-(a||0),(e.delta||a===void 0)&&(a=e.value,t(e)))}},p=-1,w=function(){return document.visibilityState==="hidden"?0:1/0},F=function(){y(function(t){var e=t.timeStamp;p=e},!0)},S=function(){return p<0&&(p=w(),F(),g(function(){setTimeout(function(){p=w(),F()},0)})),{get firstHiddenTime(){return p}}},A=function(t,e){var i,a=S(),n=f("FCP"),o=function(c){c.name==="first-contentful-paint"&&(u&&u.disconnect(),c.startTime<a.firstHiddenTime&&(n.value=c.startTime,n.entries.push(c),i(!0)))},r=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],u=r?null:h("paint",o);(r||u)&&(i=v(t,n,e),r&&o(r),g(function(c){n=f("FCP"),i=v(t,n,e),requestAnimationFrame(function(){requestAnimationFrame(function(){n.value=performance.now()-c.timeStamp,i(!0)})})}))},b=!1,E=-1,R=function(t,e){b||(A(function(s){E=s.value}),b=!0);var i,a=function(s){E>-1&&t(s)},n=f("CLS",0),o=0,r=[],u=function(s){if(!s.hadRecentInput){var B=r[0],q=r[r.length-1];o&&s.startTime-q.startTime<1e3&&s.startTime-B.startTime<5e3?(o+=s.value,r.push(s)):(o=s.value,r=[s]),o>n.value&&(n.value=o,n.entries=r,i())}},c=h("layout-shift",u);c&&(i=v(a,n,e),y(function(){c.takeRecords().map(u),i(!0)}),g(function(){o=0,E=-1,n=f("CLS",0),i=v(a,n,e)}))},d={passive:!0,capture:!0},H=new Date,P=function(t,e){m||(m=e,l=t,C=new Date,k(removeEventListener),D())},D=function(){if(l>=0&&l<C-H){var t={entryType:"first-input",name:m.type,target:m.target,cancelable:m.cancelable,startTime:m.timeStamp,processingStart:m.timeStamp+l};T.forEach(function(e){e(t)}),T=[]}},I=function(t){if(t.cancelable){var e=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;t.type=="pointerdown"?function(i,a){var n=function(){P(i,a),r()},o=function(){r()},r=function(){removeEventListener("pointerup",n,d),removeEventListener("pointercancel",o,d)};addEventListener("pointerup",n,d),addEventListener("pointercancel",o,d)}(e,t):P(e,t)}},k=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach(function(e){return t(e,I,d)})},M=function(t,e){var i,a=S(),n=f("FID"),o=function(u){u.startTime<a.firstHiddenTime&&(n.value=u.processingStart-u.startTime,n.entries.push(u),i(!0))},r=h("first-input",o);i=v(t,n,e),r&&y(function(){r.takeRecords().map(o),r.disconnect()},!0),r&&g(function(){var u;n=f("FID"),i=v(t,n,e),T=[],l=-1,m=null,k(addEventListener),u=o,T.push(u),D()})},L={},N=function(t,e){var i,a=S(),n=f("LCP"),o=function(c){var s=c.startTime;s<a.firstHiddenTime&&(n.value=s,n.entries.push(c),i())},r=h("largest-contentful-paint",o);if(r){i=v(t,n,e);var u=function(){L[n.id]||(r.takeRecords().map(o),r.disconnect(),L[n.id]=!0,i(!0))};["keydown","click"].forEach(function(c){addEventListener(c,u,{once:!0,capture:!0})}),y(u,!0),g(function(c){n=f("LCP"),i=v(t,n,e),requestAnimationFrame(function(){requestAnimationFrame(function(){n.value=performance.now()-c.timeStamp,L[n.id]=!0,i(!0)})})})}},O=function(t){var e,i=f("TTFB");e=function(){try{var a=performance.getEntriesByType("navigation")[0]||function(){var n=performance.timing,o={entryType:"navigation",startTime:0};for(var r in n)r!=="navigationStart"&&r!=="toJSON"&&(o[r]=Math.max(n[r]-n.navigationStart,0));return o}();if(i.value=i.delta=a.responseStart,i.value<0||i.value>performance.now())return;i.entries=[a],t(i)}catch{}},document.readyState==="complete"?setTimeout(e,0):addEventListener("load",function(){return setTimeout(e,0)})};export{R as getCLS,A as getFCP,M as getFID,N as getLCP,O as getTTFB};
var m,
l,
C,
T,
f = function (t, e) {
return {
name: t,
value: e === void 0 ? -1 : e,
delta: 0,
entries: [],
id: 'v2-'.concat(Date.now(), '-').concat(Math.floor(8999999999999 * Math.random()) + 1e12),
}
},
h = function (t, e) {
try {
if (PerformanceObserver.supportedEntryTypes.includes(t)) {
if (t === 'first-input' && !('PerformanceEventTiming' in self)) return
var i = new PerformanceObserver(function (a) {
return a.getEntries().map(e)
})
return i.observe({ type: t, buffered: !0 }), i
}
} catch {}
},
y = function (t, e) {
var i = function a(n) {
;(n.type !== 'pagehide' && document.visibilityState !== 'hidden') ||
(t(n), e && (removeEventListener('visibilitychange', a, !0), removeEventListener('pagehide', a, !0)))
}
addEventListener('visibilitychange', i, !0), addEventListener('pagehide', i, !0)
},
g = function (t) {
addEventListener(
'pageshow',
function (e) {
e.persisted && t(e)
},
!0,
)
},
v = function (t, e, i) {
var a
return function (n) {
e.value >= 0 && (n || i) && ((e.delta = e.value - (a || 0)), (e.delta || a === void 0) && ((a = e.value), t(e)))
}
},
p = -1,
w = function () {
return document.visibilityState === 'hidden' ? 0 : 1 / 0
},
F = function () {
y(function (t) {
var e = t.timeStamp
p = e
}, !0)
},
S = function () {
return (
p < 0 &&
((p = w()),
F(),
g(function () {
setTimeout(function () {
;(p = w()), F()
}, 0)
})),
{
get firstHiddenTime() {
return p
},
}
)
},
A = function (t, e) {
var i,
a = S(),
n = f('FCP'),
o = function (c) {
c.name === 'first-contentful-paint' &&
(u && u.disconnect(), c.startTime < a.firstHiddenTime && ((n.value = c.startTime), n.entries.push(c), i(!0)))
},
r =
window.performance && performance.getEntriesByName && performance.getEntriesByName('first-contentful-paint')[0],
u = r ? null : h('paint', o)
;(r || u) &&
((i = v(t, n, e)),
r && o(r),
g(function (c) {
;(n = f('FCP')),
(i = v(t, n, e)),
requestAnimationFrame(function () {
requestAnimationFrame(function () {
;(n.value = performance.now() - c.timeStamp), i(!0)
})
})
}))
},
b = !1,
E = -1,
R = function (t, e) {
b ||
(A(function (s) {
E = s.value
}),
(b = !0))
var i,
a = function (s) {
E > -1 && t(s)
},
n = f('CLS', 0),
o = 0,
r = [],
u = function (s) {
if (!s.hadRecentInput) {
var B = r[0],
q = r[r.length - 1]
o && s.startTime - q.startTime < 1e3 && s.startTime - B.startTime < 5e3
? ((o += s.value), r.push(s))
: ((o = s.value), (r = [s])),
o > n.value && ((n.value = o), (n.entries = r), i())
}
},
c = h('layout-shift', u)
c &&
((i = v(a, n, e)),
y(function () {
c.takeRecords().map(u), i(!0)
}),
g(function () {
;(o = 0), (E = -1), (n = f('CLS', 0)), (i = v(a, n, e))
}))
},
d = { passive: !0, capture: !0 },
H = new Date(),
P = function (t, e) {
m || ((m = e), (l = t), (C = new Date()), k(removeEventListener), D())
},
D = function () {
if (l >= 0 && l < C - H) {
var t = {
entryType: 'first-input',
name: m.type,
target: m.target,
cancelable: m.cancelable,
startTime: m.timeStamp,
processingStart: m.timeStamp + l,
}
T.forEach(function (e) {
e(t)
}),
(T = [])
}
},
I = function (t) {
if (t.cancelable) {
var e = (t.timeStamp > 1e12 ? new Date() : performance.now()) - t.timeStamp
t.type == 'pointerdown'
? (function (i, a) {
var n = function () {
P(i, a), r()
},
o = function () {
r()
},
r = function () {
removeEventListener('pointerup', n, d), removeEventListener('pointercancel', o, d)
}
addEventListener('pointerup', n, d), addEventListener('pointercancel', o, d)
})(e, t)
: P(e, t)
}
},
k = function (t) {
;['mousedown', 'keydown', 'touchstart', 'pointerdown'].forEach(function (e) {
return t(e, I, d)
})
},
M = function (t, e) {
var i,
a = S(),
n = f('FID'),
o = function (u) {
u.startTime < a.firstHiddenTime && ((n.value = u.processingStart - u.startTime), n.entries.push(u), i(!0))
},
r = h('first-input', o)
;(i = v(t, n, e)),
r &&
y(function () {
r.takeRecords().map(o), r.disconnect()
}, !0),
r &&
g(function () {
var u
;(n = f('FID')),
(i = v(t, n, e)),
(T = []),
(l = -1),
(m = null),
k(addEventListener),
(u = o),
T.push(u),
D()
})
},
L = {},
N = function (t, e) {
var i,
a = S(),
n = f('LCP'),
o = function (c) {
var s = c.startTime
s < a.firstHiddenTime && ((n.value = s), n.entries.push(c), i())
},
r = h('largest-contentful-paint', o)
if (r) {
i = v(t, n, e)
var u = function () {
L[n.id] || (r.takeRecords().map(o), r.disconnect(), (L[n.id] = !0), i(!0))
}
;['keydown', 'click'].forEach(function (c) {
addEventListener(c, u, { once: !0, capture: !0 })
}),
y(u, !0),
g(function (c) {
;(n = f('LCP')),
(i = v(t, n, e)),
requestAnimationFrame(function () {
requestAnimationFrame(function () {
;(n.value = performance.now() - c.timeStamp), (L[n.id] = !0), i(!0)
})
})
})
}
},
O = function (t) {
var e,
i = f('TTFB')
;(e = function () {
try {
var a =
performance.getEntriesByType('navigation')[0] ||
(function () {
var n = performance.timing,
o = { entryType: 'navigation', startTime: 0 }
for (var r in n) r !== 'navigationStart' && r !== 'toJSON' && (o[r] = Math.max(n[r] - n.navigationStart, 0))
return o
})()
if (((i.value = i.delta = a.responseStart), i.value < 0 || i.value > performance.now())) return
;(i.entries = [a]), t(i)
} catch {}
}),
document.readyState === 'complete'
? setTimeout(e, 0)
: addEventListener('load', function () {
return setTimeout(e, 0)
})
}
export { R as getCLS, A as getFCP, M as getFID, N as getLCP, O as getTTFB }
5 changes: 2 additions & 3 deletions build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,13 @@
-->
<title>Second Brain</title>
<script type="module" crossorigin src="/assets/index-337682da.js"></script>
<link rel="stylesheet" href="/assets/index-381991a0.css">
<link rel="stylesheet" href="/assets/index-381991a0.css" />
</head>
<body style="background: #000">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!-- Add entry point 👇 -->



<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
Expand Down
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { defineConfig } from 'cypress'
export default defineConfig({
env: {
codeCoverage: {
exclude: "cypress/**/*.*",
exclude: 'cypress/**/*.*',
},
},
e2e: {
Expand Down
12 changes: 6 additions & 6 deletions cypress/e2e/sanity.cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
describe("sanity check", () => {
it("should pass", () => {
expect(1 + 2).to.equal(3);
expect(2 + 2).to.not.equal(5);
});
});
describe('sanity check', () => {
it('should pass', () => {
expect(1 + 2).to.equal(3)
expect(2 + 2).to.not.equal(5)
})
})
2 changes: 1 addition & 1 deletion cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
// }
// }
// }
// }
14 changes: 7 additions & 7 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node"]
},
"include": ["**/*.ts"]
}
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node"]
},
"include": ["**/*.ts"]
}
6 changes: 1 addition & 5 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<meta name="description" content="Web site created using create-react-app" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
Expand All @@ -25,7 +22,6 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Second Brain</title>

</head>
<body style="background: #000">
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
3 changes: 3 additions & 0 deletions public/svg-icons/CheckIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/svg-icons/ChevronDownIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/svg-icons/ChevronUpIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading