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]: Filter on which file to ask the question #1794

Closed
StanGirard opened this issue Dec 2, 2023 · 6 comments
Closed

[Feature]: Filter on which file to ask the question #1794

StanGirard opened this issue Dec 2, 2023 · 6 comments
Assignees
Labels
adventofcode area: frontend Related to frontend functionality or under the /frontend directory enhancement New feature or request good first issue Good for newcomers Stale

Comments

@StanGirard
Copy link
Collaborator

The Feature

image

I'd like the user to be able to filter by typing / the file on which he wants to ask a question

Motivation, pitch

Allow the user to ask question on only one file :)

Twitter / LinkedIn details

No response

@StanGirard StanGirard added enhancement New feature or request good first issue Good for newcomers adventofcode labels Dec 2, 2023
Copy link

dosubot bot commented Dec 2, 2023

🤖

Hello @StanGirard,

Great to see you back here! I hope everything's been going well with your experience of Quivr.

Thank you for your feature request. It seems like you want to enhance the question bar by allowing users to filter questions based on a specific file. This is indeed a useful feature that can improve the user experience by narrowing down the scope of the questions.

Looking at the current implementation of the file selection and question bar in the Quivr codebase, it seems feasible to integrate this feature. The file selection is currently implemented using a select HTML element in the ModelSelection component, and the question bar is implemented as a React component named OnboardingQuestions.

To implement this feature, we could modify the OnboardingQuestions component to include a file selection dropdown similar to the one in the ModelSelection component. When a file is selected, we could filter the questions based on the selected file.

Here is a rough idea of how the code could look like:

export const OnboardingQuestions = (): JSX.Element => {
  const onboardingQuestions: QuestionId[] = [
    "onboarding_b1",
    "onboarding_b2",
    "onboarding_b3",
  ];
  
  const [selectedFile, setSelectedFile] = useState<string | null>(null);

  const handleFileChange = (event: React.ChangeEvent<HTMLSelectElement>) => {
    setSelectedFile(event.target.value);
  };

  return (
    <div className="flex flex-row flex-1 gap-4 mb-4">
      <select onChange={handleFileChange}>
        {/* Populate options with available files */}
      </select>
      {onboardingQuestions
        .filter(question => question.file === selectedFile)
        .map((question) => (
          <OnboardingQuestion key={question} questionId={question} />
        ))}
    </div>
  );
};

This is just a rough idea and the actual implementation might be more complex depending on the structure of the data and the specific requirements of the feature.

I hope this gives you a good starting point for implementing this feature. If you have any further questions or need more clarification, feel free to ask.

Best regards,
Dosu

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

@dosubot dosubot bot added the area: frontend Related to frontend functionality or under the /frontend directory label Dec 2, 2023
@sanatcodes
Copy link

Hi @StanGirard, would love to give this feature a shot. Can you please assign it to me 😄

@StanGirard
Copy link
Collaborator Author

Give it a go :)

@sanatcodes
Copy link

Hi @StanGirard, unfortunately, I haven't had a chance to work on this yet :/

I need more time to become familiar with the codebase. Probably will pick up another issue down the line. Don't want to block this issue for someone else who is willing and able to work on it. Thanks!

@saloni0419
Copy link

saloni0419 commented Feb 14, 2024

Can you please assign this issue to me @StanGirard . I would love to try to solve this.

Copy link
Contributor

Thanks for your contributions, we'll be closing this issue as it has gone stale. Feel free to reopen if you'd like to continue the discussion.

@github-actions github-actions bot added the Stale label May 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adventofcode area: frontend Related to frontend functionality or under the /frontend directory enhancement New feature or request good first issue Good for newcomers Stale
Projects
None yet
Development

No branches or pull requests

3 participants