Skip to content

Conversation

@Silas-Hoffmann
Copy link

Added new files:

  • app-grader-builder/src/shared/Tooltip.tsx - Default Tooltip data;
  • app-grader-builder/src/components/feedback/config/TooltipContent.ts - Tooltip content for simplified customization;
  • Tooltip exported via app-grader-builder/src/shared/index.ts.

Changes:

  • I had to modify ToggleSwitch.tsx and ReportTittleImput.tsx, changing the data input logic from string to ReactNode to support Tooltip functionality. I'm not sure if this might affect system functionality;
  • Tooltips were imported in index.tsx.

Note:

It was suggested to use an SVG icon from "hugeicons", but I found it more appropriate to use an Inline SVG to avoid external library dependencies and allow for easier future manipulation.

@vercel
Copy link

vercel bot commented Jan 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app-grader-builder Error Error Jan 30, 2026 4:56pm

<ReportTitleInput
title={feedbackForm.reportTitle}
onChange={feedbackForm.setReportTitle}
label={
Copy link
Contributor

Choose a reason for hiding this comment

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

MDN and WCAG guidelines recommend keeping labels simple and text-only. It isn't advised to insert interactive elements as labels. The best approach is the one you used here:

{/* Contexto da Atividade */}
                <div className="space-y-1">
                  <div className="flex items-center gap-2">
                    <p className="text-gray-400 font-medium text-sm">Contexto da Atividade</p>
                    <Tooltip content={TOOLTIP_CONTENT.ai.Contexto_da_atividade} />
                  </div>
                  <textarea
                    value={feedbackForm.activityContext}
                    onChange={(e: ChangeEvent<HTMLTextAreaElement>) => feedbackForm.setActivityContext(e.target.value)}
                    className="w-full bg-gray-700 border border-gray-600 rounded-xl p-4 text-gray-300 text-xs leading-relaxed focus:outline-none focus:border-indigo-500 focus:ring-1 focus:ring-indigo-500 min-h-[150px] resize-y"
                    placeholder="Descreva o contexto da atividade..."
                  />
                </div>

Also note that you're repeating yourself with the wrapper.

interface ToggleSwitchProps {
id: string;
label: string;
label: ReactNode;
Copy link
Contributor

Choose a reason for hiding this comment

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

Labels should be strings. Maybe introduce a new prop tooltipText? : string in which you can consistently check inside implementations as {tooltip && <Tooltip content={tooltipText} />}
If following this suggestion: ReportTitleInput.jsx should also be edited

@@ -0,0 +1,19 @@
export const TOOLTIP_CONTENT = {
Copy link
Contributor

Choose a reason for hiding this comment

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

Modify object name to camelCase to match project pattern

@ArthurCRodrigues
Copy link
Member

I know you used AI here, i know...

Copy link
Member

@ArthurCRodrigues ArthurCRodrigues left a comment

Choose a reason for hiding this comment

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

@drumondpucminas needs review

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.

4 participants