Skip to content

Commit

Permalink
fix: add fixed heights for date picker and table header (month and bu…
Browse files Browse the repository at this point in the history
…ttons) (#26932)

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
adamleithp and github-actions[bot] authored Dec 16, 2024
1 parent 95fd4fb commit 114936e
Show file tree
Hide file tree
Showing 37 changed files with 12 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.LemonCalendar {
--lemon-calendar-month-height: 305px;
--lemon-calendar-row-gap: 2px;
--lemon-calendar-day-width: 40px;
--lemon-calendar-today-radius: 2px;
Expand All @@ -7,6 +8,9 @@
// Tricky: needs to match the equivalent height button from LemonButton.scss
--lemon-calendar-time-button-height: 2.3125rem;

// Force height for month so when swtiching to longer months, the height doesn't change
height: var(--lemon-calendar-month-height);

.LemonCalendar__month {
width: 100%;
}
Expand All @@ -23,6 +27,10 @@
}

.LemonCalendar__month tr {
&.LemonCalendar__month-header {
height: var(--lemon-calendar-time-button-height);
}

.LemonButton {
&.rounded-none {
border-radius: 0;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/lib/lemon-ui/LemonCalendar/LemonCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const LemonCalendar = forwardRef(function LemonCalendar(
return (
<table className="LemonCalendar__month" key={month} data-attr="lemon-calendar-month">
<thead>
<tr>
<tr className="LemonCalendar__month-header">
<th className="relative">
{showLeftMonth && (
<LemonButton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ Minute.args = { granularity: 'minute' }

export const WithTimeToggle: Story = BasicTemplate.bind({})
WithTimeToggle.args = { showTimeToggle: true }

export const WithTimeToggleAndMultipleMonths: Story = BasicTemplate.bind({})
WithTimeToggleAndMultipleMonths.args = { showTimeToggle: true, months: 3 }

0 comments on commit 114936e

Please sign in to comment.