diff --git a/web-ui/src/components/pulse/Pulse.css b/web-ui/src/components/pulse/Pulse.css
index 4fc7240f9e..fb73042e5a 100644
--- a/web-ui/src/components/pulse/Pulse.css
+++ b/web-ui/src/components/pulse/Pulse.css
@@ -20,6 +20,10 @@
margin-bottom: 1rem;
padding: 1rem;
}
+
+ .title-row {
+ display: flex;
+ }
}
:root[data-mui-color-scheme='dark'] {
diff --git a/web-ui/src/components/pulse/Pulse.jsx b/web-ui/src/components/pulse/Pulse.jsx
index 379942c6d8..9fc22ad32f 100644
--- a/web-ui/src/components/pulse/Pulse.jsx
+++ b/web-ui/src/components/pulse/Pulse.jsx
@@ -30,6 +30,7 @@ const tooltips = [
const propTypes = {
comment: PropTypes.string,
commentRequired: PropTypes.bool,
+ iconRequired: PropTypes.bool,
score: PropTypes.number,
setComment: PropTypes.func,
setScore: PropTypes.func,
@@ -38,13 +39,17 @@ const propTypes = {
const Pulse = ({
comment,
commentRequired,
+ iconRequired,
score,
setComment,
setScore,
title
}) => (
-
{title}
+
+ {title}
+ {iconRequired && *}
+
{icons.map((sentiment, index) => (
@@ -52,7 +57,7 @@ const Pulse = ({
aria-label="sentiment"
className={index === score ? 'selected' : ''}
data-testid={`score-button-${index}`}
- onClick={() => setScore(index)}
+ onClick={() => setScore(score == index ? null : index)}
sx={{ color: colors[index] }}
>
{sentiment}
@@ -70,7 +75,7 @@ const Pulse = ({
}}
placeholder="Comment"
required={commentRequired}
- rows={4}
+ maxRows={4}
value={comment}
/>
diff --git a/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap b/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap
index 63e99f560f..663e3ad4d4 100644
--- a/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap
+++ b/web-ui/src/components/pulse/__snapshots__/Pulse.test.jsx.snap
@@ -6,11 +6,15 @@ exports[`renders correctly 1`] = `
-
- How are you feeling about work today? (*)
-
+
+ How are you feeling about work today? (*)
+
+
@@ -203,7 +207,6 @@ exports[`renders correctly 1`] = `
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMultiline css-1sqnrkk-MuiInputBase-input-MuiOutlinedInput-input"
id=":r5:"
placeholder="Comment"
- rows="4"
style="height: 0px; overflow: hidden;"
>
Just testing
diff --git a/web-ui/src/pages/PulsePage.jsx b/web-ui/src/pages/PulsePage.jsx
index ef6877f019..3690410e25 100644
--- a/web-ui/src/pages/PulsePage.jsx
+++ b/web-ui/src/pages/PulsePage.jsx
@@ -42,16 +42,9 @@ const PulsePage = () => {
const [year, month, day] = pulse.submissionDate;
setSubmittedToday(
year === now.getFullYear() &&
- month === now.getMonth() + 1 &&
- day === now.getDate()
+ month === now.getMonth() + 1 &&
+ day === now.getDate()
);
-
- setInternalComment(pulse.internalFeelings ?? '');
- setExternalComment(pulse.externalFeelings ?? '');
- setInternalScore(pulse.internalScore == undefined ?
- center : pulse.internalScore - 1);
- setExternalScore(pulse.externalScore == undefined ?
- center : pulse.externalScore - 1);
}, [pulse]);
const loadTodayPulse = async () => {
@@ -120,10 +113,11 @@ const PulsePage = () => {
{
diff --git a/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap b/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap
index f433cc329b..5ed6cca6d9 100644
--- a/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap
+++ b/web-ui/src/pages/__snapshots__/PulsePage.test.jsx.snap
@@ -8,11 +8,20 @@ exports[`renders correctly 1`] = `
-
- How are you feeling about work today? (*)
-
+
+ How are you feeling about work today?
+
+
+ *
+
+
@@ -205,7 +214,6 @@ exports[`renders correctly 1`] = `
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMultiline css-1sqnrkk-MuiInputBase-input-MuiOutlinedInput-input"
id=":r5:"
placeholder="Comment"
- rows="4"
style="height: 0px; overflow: hidden;"
/>
@@ -430,7 +442,6 @@ exports[`renders correctly 1`] = `
class="MuiInputBase-input MuiOutlinedInput-input MuiInputBase-inputMultiline css-1sqnrkk-MuiInputBase-input-MuiOutlinedInput-input"
id=":rb:"
placeholder="Comment"
- rows="4"
style="height: 0px; overflow: hidden;"
/>