Skip to content

Commit

Permalink
feat: create blog post for search improvements (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
PupoSDC authored Jan 20, 2024
1 parent cf1b006 commit 956596d
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ incorrect. For this simple question, it's possible to write 18 variations!
That's 16 times more seeing this question than you really need to see it. In
Chair Flight, these question variants are combined into a single question:

{" "}

<QuestionOverview
questionId={"QYFPA3CY4E"}
questionBank="Atpl"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
import { Suspense } from "react";
import { useRouter } from "next/router";
import { NoSsr } from "@mui/base";
import { Sheet, Skeleton } from "@mui/joy";
import { TestMaker, useTestProgress } from "@chair-flight/react/containers";
import { BlogPageLayout } from "./_blog-page.layout";

export const meta = {
Expand Down Expand Up @@ -31,30 +26,12 @@ With over 300 thoughtfully curated questions, this question bank is designed to
challenge and enhance your understanding of the 737's systems, procedures, and
aircraft limitations.

You can create a [new test here](/modules/type/tests/create).

export const InLocoTestMakeer = () => {
const router = useRouter();
const fallback = <Skeleton sx={{ height: 400, position: "initial" }} />

return (
<Sheet sx={{ p: 1, my: 2, height: 600 }}>
<NoSsr fallback={fallback}>
<Suspense fallback={fallback}>
<TestMaker
sx={{ height: "100%" }}
questionBank={"737"}
onSuccessfulTestCreation={(test) => {
router.push(`/modules/type/tests/${test.id}/${test.mode}`);
}}
/>
</Suspense>
</NoSsr>
</Sheet>
);
}

<InLocoTestMakeer />

<br />

You can get started here: [B737 Question Bank](/modules/type)

<br />

**See you in the skies!**

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
import { Suspense } from "react";
import { useRouter } from "next/router";
import { NoSsr } from "@mui/base";
import { default as AirplaneTicketIcon } from "@mui/icons-material/AirplaneTicket";
import { default as FlightTakeoffIcon } from "@mui/icons-material/FlightTakeoff";
import { default as StyleIcon } from "@mui/icons-material/Style";
import { Stack, Link } from "@mui/joy";
import { ModuleSelectionButton } from "@chair-flight/react/components";
import { TestMaker, useTestProgress } from "@chair-flight/react/containers";
import { BlogPageLayout } from "./_blog-page.layout";

export const meta = {
Expand Down
66 changes: 66 additions & 0 deletions apps/next-app/pages/articles/blog/006-improving-search.page.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { Link } from "@mui/joy";
import { QuestionSearch } from "@chair-flight/react/containers";
import { BlogPageLayout } from "./_blog-page.layout";

export const meta = {
title: "Improving Search",
linkTitle: "Improving Search",
file: "006-improving-search",
description: [
"Finding questions on the Chair Flight Database has now become both faster and ",
"easier! We have added the ability to filter by subjects, learning objectives, as",
"well as the ability to specify what exactly you are searching for.",
].join(""),
tags: ["Feature"],
author: "PupoSDC",
isoDate: "2024-01-20T20:00:00.000Z",
};

# Improving Search

Finding questions on the Chair Flight Database has now become both faster and
easier! We have added the ability to filter by subjects, learning objectives, as
well as the ability to specify what exactly you are searching for.

Since Demos are worth 1000 pictures, have a go at the new question search forsti
the ATPL module right here:

<br />

<QuestionSearch
noSsr
questionBank="atpl"
forceMode="mobile"
sx={{ height: 500 }}
/>

<br />

<Link
href="/modules/atpl/questions"
display="block"
color="primary"
children="Search ATPL Questions"
/>

<Link
href="/modules/atpl/learning-objectives"
display="block"
color="primary"
children="Search ATPL Learning Objectives"
/>

<Link
href="/modules/type/questions"
display="block"
color="primary"
children="Search Type Rating Questions"
/>

<br />

**See you in the skies!**

export default ({ children }) => (
<BlogPageLayout meta={meta}>{children}</BlogPageLayout>
);
1 change: 0 additions & 1 deletion libs/react/components/src/flashcard/flashcard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const Flashcard = forwardRef<HTMLDivElement, FlashcardProps>(
variant="outlined"
sx={{ transform: flipped ? "rotateY(180deg)" : "rotateY(0deg)" }}
>
{" "}
<Box
sx={{
flex: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const QuestionVariantPreview = forwardRef<
alignItems: "center",
}}
>
<Typography level="h5">{`${id}`}</Typography>{" "}
<Typography level="h5">{`${id}`}</Typography>
{variantId && <Typography level="body-sm">{`${variantId}`}</Typography>}
<Box sx={{ display: "flex", alignItems: "flex-end" }}>
{topRightCorner}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export const LayoutModule = container<Props, Params, Data>(
const secondToLastBreadcrumb = breadcrumbs?.at(-2);
const lastBreadcrumb = breadcrumbs?.at(-1);

console.log(secondToLastBreadcrumb);
return (
<>
<ThemeOverrideColorScheme questionBank={questionBank} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const QuestionSearch = container<Props, Params, Data>(
<Option value={"externalIds"}>External Ids</Option>
</HookFormSelect>
<HookFormSelect size="sm" {...form.register("subject")}>
<Option value={null}>All Subjects</Option>
<Option value={"all"}>All Subjects</Option>
{subjects.map(({ id, shortName }) => (
<Option value={id} key={id}>
{shortName}
Expand Down

1 comment on commit 956596d

@vercel
Copy link

@vercel vercel bot commented on 956596d Jan 20, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.