From b9c79c758db017e16554b55b1d56b0868c51ca6b Mon Sep 17 00:00:00 2001 From: Ayush Thakur <100013900+ayusht2810@users.noreply.github.com> Date: Mon, 22 Jul 2024 22:30:19 +0530 Subject: [PATCH] Fix UI issue occurring while opening assignee modal (#250) * Fix UI issue occurring while opening assignee modal * Fix flaky tests * Fix modal position --------- Co-authored-by: raghavaggarwal2308 --- build/pluginctl/logs_test.go | 14 +++++++------- .../components/assignee_modal/assignee_form.jsx | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build/pluginctl/logs_test.go b/build/pluginctl/logs_test.go index 687d8c2..2917a27 100644 --- a/build/pluginctl/logs_test.go +++ b/build/pluginctl/logs_test.go @@ -154,17 +154,17 @@ func TestFilterLogEntries(t *testing.T) { }, "filter out old entries": { logs: []string{ - fmt.Sprintf(`{"message":"old2", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, time.Now().Add(-2*time.Second).Format(timeStampFormat)), - fmt.Sprintf(`{"message":"old1", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, time.Now().Add(-1*time.Second).Format(timeStampFormat)), - fmt.Sprintf(`{"message":"now", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, time.Now().Format(timeStampFormat)), - fmt.Sprintf(`{"message":"new1", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, time.Now().Add(1*time.Second).Format(timeStampFormat)), - fmt.Sprintf(`{"message":"new2", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, time.Now().Add(2*time.Second).Format(timeStampFormat)), + fmt.Sprintf(`{"message":"old2", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, now.Add(-2*time.Second).Format(timeStampFormat)), + fmt.Sprintf(`{"message":"old1", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, now.Add(-1*time.Second).Format(timeStampFormat)), + fmt.Sprintf(`{"message":"now", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, now.Format(timeStampFormat)), + fmt.Sprintf(`{"message":"new1", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, now.Add(1*time.Second).Format(timeStampFormat)), + fmt.Sprintf(`{"message":"new2", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, now.Add(2*time.Second).Format(timeStampFormat)), }, pluginID: "some.plugin.id", since: now, expectedLogs: []string{ - fmt.Sprintf(`{"message":"new1", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, time.Now().Add(1*time.Second).Format(timeStampFormat)), - fmt.Sprintf(`{"message":"new2", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, time.Now().Add(2*time.Second).Format(timeStampFormat)), + fmt.Sprintf(`{"message":"new1", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, now.Add(1*time.Second).Format(timeStampFormat)), + fmt.Sprintf(`{"message":"new2", "plugin_id": "some.plugin.id", "timestamp": "%s"}`, now.Add(2*time.Second).Format(timeStampFormat)), }, expectedErr: false, }, diff --git a/webapp/src/components/assignee_modal/assignee_form.jsx b/webapp/src/components/assignee_modal/assignee_form.jsx index c52e34a..b6b9a65 100644 --- a/webapp/src/components/assignee_modal/assignee_form.jsx +++ b/webapp/src/components/assignee_modal/assignee_form.jsx @@ -104,7 +104,7 @@ AssigneeForm.propTypes = { const getStyle = (theme) => ({ backdrop: { - position: 'absolute', + position: 'fixed', display: 'flex', top: 0, left: 0,