Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
Fix tooltip rendering in wrong position on first mount
Luke Vellac1a3394a9326
diff --git a/components/poll/participant-row-form.tsx b/components/poll/participant-row-form.tsxindex 6033ba4dc..1f5d773d8 100644--- a/components/poll/participant-row-form.tsx+++ b/components/poll/participant-row-form.tsx@@ -7,6 +7,7 @@ import { requiredString } from "../../utils/form-validation";import Button from "../button";import CheckCircle from "../icons/check-circle.svg";import NameInput from "../name-input";+import Tooltip from "../tooltip";import { ControlledScrollDiv } from "./poll";import { usePollContext } from "./poll-context";import { ParticipantForm } from "./types";@@ -160,13 +161,15 @@ const ParticipantRowForm: React.VoidFunctionComponent<ParticipantRowFormProps> =})}</ControlledScrollDiv><div className="flex items-center px-2 space-x-2 transition-all">- <Button- htmlType="submit"- icon={<CheckCircle />}- type="primary"- loading={isSubmitting}- data-testid="submitNewParticipant"- />+ <Tooltip content="Save" placement="top">+ <Button+ htmlType="submit"+ icon={<CheckCircle />}+ type="primary"+ loading={isSubmitting}+ data-testid="submitNewParticipant"+ />+ </Tooltip><Button onClick={onCancel} type="default">Cancel</Button>diff --git a/components/tooltip.tsx b/components/tooltip.tsxindex cffed1132..1ff58a809 100644--- a/components/tooltip.tsx+++ b/components/tooltip.tsx@@ -91,7 +91,7 @@ const Tooltip: React.VoidFunctionComponent<TooltipProps> = ({>{children}</div>- {portal && debouncedValue+ {portal? ReactDOM.createPortal(<divref={setPopperElement}diff --git a/style.css b/style.cssindex 69ec990ed..13a15ff01 100644--- a/style.css+++ b/style.css@@ -124,6 +124,10 @@[data-popper-placement="bottom"] .tooltip-arrow {@apply bottom-full border-b-slate-700;}++ [data-popper-placement="top"] .tooltip-arrow {+ @apply top-full border-t-slate-700;+ }}@layer components {