-
Notifications
You must be signed in to change notification settings - Fork 649
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
Remove Questionnaire show screen #10864
Conversation
WalkthroughThe changes remove the functionality for viewing individual questionnaires. The route and component for displaying a questionnaire by its ID have been removed from the admin routes and component files. Additionally, the navigation in the questionnaire list now directs users to the edit page rather than the view page. Other functionalities related to questionnaire creation and editing remain intact. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant QList as QuestionnaireList
participant Router as Admin Router
participant EditPage as QuestionnaireEdit
User->>QList: Click on questionnaire row
QList->>Router: Navigate to "/admin/questionnaire/{slug}/edit"
Router->>EditPage: Render questionnaire edit page
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for care-ohc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/Questionnaire/QuestionnaireList.tsx (1)
4-10
: Consider removing unused EyeIcon importIf the View functionality is being completely removed from the Questionnaire feature, the EyeIcon import might no longer be needed.
import { ArchiveIcon, - EyeIcon, FileCheckIcon, NotepadTextDashedIcon, PlusIcon, Search, } from "lucide-react";
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/Routers/routes/adminRoutes.tsx
(0 hunks)src/components/Questionnaire/QuestionnaireList.tsx
(1 hunks)src/components/Questionnaire/show.tsx
(0 hunks)
💤 Files with no reviewable changes (2)
- src/Routers/routes/adminRoutes.tsx
- src/components/Questionnaire/show.tsx
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: Redirect rules - care-ohc
- GitHub Check: Header rules - care-ohc
- GitHub Check: Pages changed - care-ohc
- GitHub Check: Test
- GitHub Check: OSSAR-Scan
- GitHub Check: cypress-run (1)
🔇 Additional comments (2)
src/components/Questionnaire/QuestionnaireList.tsx (2)
111-113
: Navigation path successfully updated to skip the show screenThe navigation path has been updated to directly route to the edit page instead of the show page, which aligns with the PR objective to remove the Questionnaire show screen.
126-133
: "View" button appears inconsistent with the navigation changeWhile the row click handler now navigates directly to edit mode, there's still a "View" button with an EyeIcon in the UI. This could confuse users since the show screen functionality has been removed.
Consider either:
- Removing this button entirely
- Changing it to an "Edit" button with an appropriate icon
- Updating its click handler to align with the new behavior
-<Button - variant="outline" - size="sm" - className="font-semibold shadow-gray-300 text-gray-950 border-gray-400" -> - <EyeIcon className="w-4 h-4 mr-0" /> - {t("View")} -</Button> +<Button + variant="outline" + size="sm" + className="font-semibold shadow-gray-300 text-gray-950 border-gray-400" +> + <PencilIcon className="w-4 h-4 mr-0" /> + {t("Edit")} +</Button>
CARE
|
Project |
CARE
|
Branch Review |
ques-remove-show
|
Run status |
|
Run duration | 07m 26s |
Commit |
|
Committer | Amjith Titus |
View all properties for this run ↗︎ |
Test results | |
---|---|
|
0
|
|
0
|
|
0
|
|
0
|
|
12
|
View all changes introduced in this branch ↗︎ |
@amjithtitus09 Your efforts have helped advance digital healthcare and TeleICU systems. 🚀 Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! 🙌 |
Questionnaire List -> On click -> Skips show screen and opens edit screen directly
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit