Skip to content

Comments

Fix feedback form#710

Open
AnilKumar3494 wants to merge 11 commits intodevelopfrom
fix-feedback-form
Open

Fix feedback form#710
AnilKumar3494 wants to merge 11 commits intodevelopfrom
fix-feedback-form

Conversation

@AnilKumar3494
Copy link
Member

@AnilKumar3494 AnilKumar3494 commented Feb 16, 2026

Change Summary

This updates the feedback/contact form page. Instead of loading AirTable iframe that was taking about 4 to 5 sec every time, this replaces it with a custom form and does insert to Supabase 'airtable_feedback' table on submit.

Change Reason

Makes the form load and submission instantly and gives full control to us.

This also resolves the below:
#680
#686
#687

@AnilKumar3494 AnilKumar3494 requested a review from RNR1 February 19, 2026 21:02
label="Helpful info"
options={tagOptions}
labelPlacement="start"
labelPlacement="end"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we create the new form without affecting existing forms? Is this change necessary?

labelPlacement = 'end',
sx
}: FormCheckboxFieldProps<Values>) => {
const { control } = useFormContext<Values>();
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, we only use controlled fields when we have no other choice (e.g., for non-standard form fields that doesn't support native HTML inputs). using uncontrolled form fields (using the register method) should be the preferred way, as it will not trigger rerender for each change. See the existing implementation as a reference

label: ReactNode;
helperText?: string;
labelPlacement?: 'bottom' | 'end' | 'start' | 'top';
sx?: TextFieldProps['sx'];
Copy link
Contributor

Choose a reason for hiding this comment

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

For consistency, we should avoid exposing style changes for generic components. This will open the door to inconsistent styling across pages

label={option.label}
labelPlacement={labelPlacement}
value={option.value}
sx={{ justifyContent: 'space-between' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for this change?

multiline?: boolean;
minRows?: number;
slotProps?: TextFieldProps['slotProps'];
sx?: TextFieldProps['sx'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

/>

<Stack direction="row" gap={5} mt={2}>
<Button
Copy link
Contributor

Choose a reason for hiding this comment

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

The design doesn't show a reset button for this form, so I don't think we have to show one

<Button
variant="contained"
type="submit"
disabled={isPending || isSuccess}
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use the Button loading prop for that

Copy link
Contributor

Choose a reason for hiding this comment

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

What is the reason for this icon change?

import.meta.env.VITE_DB_API_KEY ||
'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6IndhbnR5Y2Zibnp6b2NzYnRocXpzIiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzcwNDY2OTgsImV4cCI6MjA1MjYyMjY5OH0.yczsMOx3Y-zsWu-GjYEajIb0yw9fYWEIUglmmfM1zCY';
const contributorDatabaseName = 'airtable_contributors';
const feedbackDatabaseName = 'airtable_feedback';
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this table sourced from Airtable? Otherwise - I think a better name for it would be user_feedbacks

bathroom?: BathroomInfo | null;
};

export type FeedbackForm = {
Copy link
Contributor

Choose a reason for hiding this comment

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

The ResourceEntry typing file is dedicated for Resource related type definitions. Since this is a feedback form, it should live in a seperate file

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.

2 participants