Skip to content

feat: Mcq UI #19

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

Merged
merged 28 commits into from
Jun 27, 2025
Merged

feat: Mcq UI #19

merged 28 commits into from
Jun 27, 2025

Conversation

shirsho-12
Copy link
Contributor

@shirsho-12 shirsho-12 commented Jun 16, 2025

Closes #12

MCQ Panel Implementation

  • Added a new getMcqHtml function in src/commands/showPanel.tsx to generate the HTML content for the MCQ panel, including React-based components for rendering questions and options.
  • Implemented the McqPanel React component in src/webview/components/McqPanel.tsx to display MCQ questions and handle user interactions.
  • Updated the handleMessage function in src/commands/showPanel.tsx to handle MessageTypeNames.MCQQuestion and create a webview panel for displaying MCQs.

Messaging System Updates

  • Added a new MCQQuestion message type to the Messages utility in src/utils/messages.ts, allowing the extension to send and receive MCQ-related data.

Editor Class Enhancements

  • Extended the Editor class in src/utils/editor.ts to include a new assessmentType property, which can store additional context about the type of assessment. [1] [2]

The PR is dependent on frontend/vscode/next.

TODO:

  • Refactoring the raw HTML out of commands/showPanel.tsx
  • Functionality for clicking submit on MCQ answer

Current state:
image

1. Fix `yarn compile` to `yarn run build`
2. Add dev instructions to configure the extension
- Integrate new message type: MCQQuestion
- Add UI component for the MCQ Panel
- Add Markdown rendering
@shirsho-12 shirsho-12 requested a review from heyzec June 16, 2025 17:04
@heyzec
Copy link
Collaborator

heyzec commented Jun 16, 2025

Interesting. Was thinking more of this
image

@shirsho-12
Copy link
Contributor Author

Interesting. Was thinking more of this image

Noticed that I duplicated the text on the left, will remove that. Instead of suppressing the editor, it made more sense to extend the message passing and creating a new pane. What do you think? As for the UI I can make it look the same after a bit of work.

@heyzec
Copy link
Collaborator

heyzec commented Jun 17, 2025

The original approach I had in mind requires minimal code but compared to yours, will have no choice but to maximise and shrink the Webview panel tab, which can be jarring to the user UI-wise. I think your approach would be better.

@shirsho-12
Copy link
Contributor Author

shirsho-12 commented Jun 24, 2025

NOTE: Choices may contain hints (not implemented)

@shirsho-12
Copy link
Contributor Author

shirsho-12 commented Jun 24, 2025

image
New MCQ UI for the panel

@shirsho-12 shirsho-12 self-assigned this Jun 24, 2025
@shirsho-12 shirsho-12 mentioned this pull request Jun 26, 2025
@martin-henz martin-henz requested a review from mug1wara26 June 27, 2025 05:07
@heyzec heyzec changed the title Feat: Mcq UI feat: Mcq UI Jun 27, 2025
@heyzec
Copy link
Collaborator

heyzec commented Jun 27, 2025

The MCQ UI looks good. Thanks!

@heyzec heyzec enabled auto-merge (squash) June 27, 2025 16:39
@heyzec heyzec merged commit 538a13b into main Jun 27, 2025
2 checks passed
@heyzec heyzec deleted the mcq-ui branch June 27, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the UI make sense for MCQ assessments
2 participants