Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syncing branch to latest code, added default parameters to navigateTo call #5529

Merged
Changes from 1 commit
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
829742b
fix: reduced portal zindex
Tooluloope May 6, 2021
00669d9
fix: move dropdown options to portal
Tooluloope May 7, 2021
ff4dbfd
Merge branch 'release' into fix/Datasource-dropdown-stacking-issue
Tooluloope May 7, 2021
579085a
Merge branch 'fix/Datasource-dropdown-stacking-issue' into fix/dropdo…
Tooluloope May 10, 2021
23367fe
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope May 10, 2021
8c48479
fix: overlay covering widget explorer
Tooluloope May 10, 2021
0b1db56
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope May 12, 2021
18e5dde
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope May 18, 2021
523972e
Fix: modal and Dropdown
Tooluloope May 19, 2021
4e890dc
fix: remove unnecessary className
Tooluloope May 19, 2021
4c38348
fix: remove console statement
Tooluloope May 19, 2021
c76ef9e
FEATURE-2111 : Show/Hide Table Controls
wmdev0808 May 11, 2021
f943d0b
FEATURE-2111 : Show/Hide Table Controls
wmdev0808 May 11, 2021
35e28dc
FEATURE-2111 : Show/Hide Table Controls
wmdev0808 May 12, 2021
7cf12ed
FEATURE-2111 : Show/Hide Table Controls
wmdev0808 May 14, 2021
9e0ec23
Revert "FEATURE-2111 : Show/Hide Table Controls"
wmdev0808 May 17, 2021
c906b0e
FEATURE-2111 : Show/Hide table controls
wmdev0808 May 19, 2021
c1557c1
FEATURE-2111 : Show/Hide Table Controls
wmdev0808 May 19, 2021
afcf7d7
fix: PR comments
Tooluloope May 20, 2021
0372e47
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope May 20, 2021
6381f5d
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope May 21, 2021
b2a86d7
fix: failing modal test
Tooluloope May 24, 2021
b95ff20
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope May 24, 2021
4ac85a7
fix: add Layers to the dropdown
Tooluloope May 24, 2021
f54d4c6
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope May 26, 2021
b78c620
fix: Add zIndex Layers of Dropdown and Modal
Tooluloope May 26, 2021
59738c5
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope Jun 1, 2021
6e83380
- Change useEffect hook to use deep cehck for modifiers instead of re…
Jun 1, 2021
3d18a9b
FIX #4731: update condition for selectedRowIndices when table widget …
vibhandikyash Jun 2, 2021
d794cbb
Merge branch 'release' into fix/dropdown-overlap-modal
somangshu Jun 3, 2021
53fe96b
FEATURE-2111 : Show/Hide Table Controls
wmdev0808 Jun 3, 2021
f7ae4f0
Merge branch 'release' into feature/2111-toggle-header-options
wmdev0808 Jun 3, 2021
64a3131
Merge branch 'release' into perf/ui/optimize-popper-component/4837
Jun 3, 2021
430e852
FIX #4875 : update modal onclick reference for same modal while pasti…
vibhandikyash Jun 5, 2021
e0642dd
Merge branch 'release' into perf/ui/optimize-popper-component/4837
Jun 7, 2021
210e65a
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope Jun 7, 2021
6ce1e35
Add API for setting page order in an application
sharat87 Jun 7, 2021
b0c7c1c
fix: options display in deploy view
Tooluloope Jun 8, 2021
d2fafaa
Merge branch 'release' into perf/ui/optimize-popper-component/4837
Jun 8, 2021
f88f137
- Close the property pane at the start of the test as it's not closed…
Jun 8, 2021
a5cdf32
FEATURE-1726 : iframe widget
wmdev0808 Jun 9, 2021
4787b74
Add API for setting page order in an application
sharat87 Jun 7, 2021
8cef35c
FEATURE-2111 : Show/Hide Table Controls
wmdev0808 Jun 9, 2021
a54b0ff
Merge branch 'release' into feature/2111-toggle-header-options
wmdev0808 Jun 9, 2021
47da2c6
FEATURE-1726 : Iframe Widget
wmdev0808 Jun 10, 2021
7acba5e
Add page re-order API
AnaghHegde Jun 10, 2021
4df8fda
Merge remote-tracking branch 'origin/feature/page-order-api' into fea…
AnaghHegde Jun 10, 2021
bcd5f06
Add page re-order API
AnaghHegde Jun 10, 2021
88a885b
FEATURE-1726 : Iframe Widget
wmdev0808 Jun 10, 2021
e2168f7
Merge branch 'release' into feature/1726-iframe-widget
wmdev0808 Jun 10, 2021
fea54e2
Moved constructor to the top.
AnaghHegde Jun 10, 2021
6c9f3c2
FEATURE-1726 : Iframe widget
wmdev0808 Jun 11, 2021
4d9ea51
Merge branch 'release' into feature/1726-iframe-widget
wmdev0808 Jun 11, 2021
809416a
Merge branch 'release' into feature/2111-toggle-header-options
wmdev0808 Jun 11, 2021
31177ef
FEATURE-1726 : Iframe Widget
wmdev0808 Jun 12, 2021
59bf649
Merge branch 'release' into feature/1726-iframe-widget
wmdev0808 Jun 12, 2021
c00cce0
Merge pull request #4849 from appsmithorg/perf/ui/optimize-popper-com…
SatishGandham Jun 14, 2021
ccd04b1
1. Added logic to handle pageDown scenario
AnaghHegde Jun 14, 2021
1ca7a0c
Add test for page reorder and add order to the response
AnaghHegde Jun 14, 2021
a2e3496
Check if user exists before loading the form (#5108)
rishabhsaxena Jun 14, 2021
861ab7e
Updated fork/duplicate test (#4923)
NandanAnantharamu Jun 14, 2021
9932f91
Use assertThat type of assertions and move the order initialization l…
AnaghHegde Jun 15, 2021
9b75dba
updated test flow (#5118)
NandanAnantharamu Jun 15, 2021
64408df
Fix: Use connection pool for Redis (#5093)
sumitsum Jun 15, 2021
d54dbd1
Merge pull request #4946 from appsmithorg/FIX/4875-model-close-icon-r…
somangshu Jun 15, 2021
4ee614b
Fix/api editor enhancement (#5095)
arunvjn Jun 15, 2021
29928aa
Merge branch 'release' into feature/1726-iframe-widget
wmdev0808 Jun 15, 2021
ca9324c
Merge pull request #4580 from appsmithorg/feature/2111-toggle-header-…
somangshu Jun 15, 2021
123fc4b
Fix incorrect action type reference (#5121)
hetunandu Jun 15, 2021
32dffd0
Update config.json
Nikhil-Nandagopal Jun 15, 2021
47bda1d
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope Jun 15, 2021
e355d34
Button UI Test Cases.
arslanhaiderbuttar Jun 15, 2021
a454059
JS Scenario
arslanhaiderbuttar Jun 15, 2021
7c43030
Allow only organization admins to export application (#5085)
abhvsn Jun 15, 2021
5c1a9b5
Add an option to set tags on transactions #5147
Jun 15, 2021
3e1702b
1. Add migration logic
AnaghHegde Jun 16, 2021
f15eba4
- Set the default perfTags value to []
Jun 16, 2021
172bf61
- Fix typo in type definitions
Jun 16, 2021
5a8ac3f
1. Fix failing unit tests for the page reorder
AnaghHegde Jun 16, 2021
eaeb54a
Modifying PR template to revert to older version (#5154)
somangshu Jun 16, 2021
77e9655
[Feature] Smart Substitution for JSON fields in Mongo Form (#5136)
trishaanand Jun 16, 2021
1b36f79
Fix merge conficts
AnaghHegde Jun 16, 2021
e748623
Merge branch 'release' into feature/page-order-api
AnaghHegde Jun 16, 2021
9b86a4c
Cypress.json update
arslanhaiderbuttar Jun 16, 2021
49788e5
Deleted Hard Waits.
arslanhaiderbuttar Jun 16, 2021
2ccc1ef
Change the test scenario
AnaghHegde Jun 16, 2021
8296f41
Merge remote-tracking branch 'origin/feature/page-order-api' into fea…
AnaghHegde Jun 16, 2021
2e0f307
Merge remote-tracking branch 'origin/release' into FIX/4731-dragging-…
Jun 16, 2021
9ce7e90
fix for #5073
rahulramesha Jun 16, 2021
e8da3d2
Added Documentation for Windows WSL2 Client Setup
rahulramesha Jun 16, 2021
e8152ce
Fix: updating basic dsl for fork and duplicate feature cypress specs …
marks0351 Jun 16, 2021
ba4450a
Resolved Conflict in QueryEditor.json file
arslanhaiderbuttar Jun 16, 2021
988cc39
Merge branch 'release' into buttonUITestCases
arslanhaiderbuttar Jun 16, 2021
a00368d
Changing instruction for better setup
rahulramesha Jun 16, 2021
e119bd7
Ignore the order of the page while checking the published and edited …
AnaghHegde Jun 16, 2021
10b3f7e
Feature/signup success url (#5124)
rishabhsaxena Jun 16, 2021
f7405f9
Reset the user in store on 401s (#5153)
rishabhsaxena Jun 16, 2021
a1a4f0e
Fature/add pagination in notifications (#5096)
nayan-rafiq Jun 16, 2021
2ffd43b
- Remove the is_array check
Jun 16, 2021
1b2f01e
Profile image updates (#4783)
rishabhsaxena Jun 16, 2021
68ba1ac
Merge pull request #5148 from appsmithorg/ui/perf/add-tags-option-to-…
SatishGandham Jun 17, 2021
26cd46e
Fix: parse json/jsonb data type values as json for postgres plugin (#…
sumitsum Jun 17, 2021
4f140d4
Merge pull request #5169 from appsmithorg/DOC-client-setup-on-wsl2
rahulramesha Jun 17, 2021
6001e69
Highlight the second item in in the omnibar search results (#4611)
akash-codemonk Jun 17, 2021
9c99f36
Comments feature fixes (view mode) (#5081)
rishabhsaxena Jun 17, 2021
884636f
Snowflake integration (#5176)
nidhi-nair Jun 17, 2021
76ad932
Add widget ID, widget type to property pane open perforamnce tracker.
Jun 17, 2021
7d8b57c
removed unwanted wait (#5206)
NandanAnantharamu Jun 17, 2021
9538242
Merge branch 'release' into buttonUITestCases
arslanhaiderbuttar Jun 17, 2021
a76b8ca
Feature: Widget Grouping Phase II (#4825)
marks0351 Jun 17, 2021
e8d731a
fix: app/server/appsmith-interfaces/pom.xml & app/server/appsmith-ser…
snyk-bot Jun 17, 2021
1134265
Fix: Show error callout in api pane when there is an error (#4827)
akash-codemonk Jun 17, 2021
1c1f739
Merge branch 'release' into buttonUITestCases
arslanhaiderbuttar Jun 17, 2021
7d901c2
Fixed and updated Button Specs.
arslanhaiderbuttar Jun 17, 2021
005c807
Add commands in Command.js
arslanhaiderbuttar Jun 17, 2021
11218c2
Fix app publish event sent at wrong times
sharat87 Jun 17, 2021
75481e9
Fix redirect URL on 401s (#5230)
rishabhsaxena Jun 17, 2021
b878255
Support for orphan API without any datasource added for import-export…
abhvsn Jun 18, 2021
bd3369d
Remove * import statements
AnaghHegde Jun 18, 2021
416adef
Update README.md
areyabhishek Jun 18, 2021
45b062b
Typo
sharat87 Jun 18, 2021
b4519b9
Merge branch 'release' of github.com:appsmithorg/appsmith into FIX/50…
rahulramesha Jun 18, 2021
6c67c20
Another typo 🤦🏻‍♂️
sharat87 Jun 18, 2021
5c17d96
[Snyk] Security upgrade net.minidev:json-smart from 2.3 to 2.4.7 (#5225)
snyk-bot Jun 18, 2021
388418c
Merge the two update commands into a single update command in Mongo F…
trishaanand Jun 18, 2021
7d08187
Merge pull request #5233 from appsmithorg/fix/send-publish-event-only…
sharat87 Jun 18, 2021
57adbd7
Schema info in templates query (#5244)
nidhi-nair Jun 18, 2021
9b39cdb
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope Jun 18, 2021
295ac58
Merge pull request #5222 from appsmithorg/ui/perf/add-widget-type-id-…
SatishGandham Jun 18, 2021
2e896e1
Merge branch 'release' into fix/dropdown-overlap-modal
Tooluloope Jun 18, 2021
ee4429b
Commenting out migration for quick fix to bring up release (#5248)
trishaanand Jun 18, 2021
91bf527
List Widget Phase 2 (#4189)
jsartisan Jun 18, 2021
040d3b0
Fix publish application event not being sent
sharat87 Jun 18, 2021
87b2d25
Merge pull request #5252 from appsmithorg/fix/publish-event-not-being…
sharat87 Jun 18, 2021
e02e572
Change the logic to have check for the order of all the pages
AnaghHegde Jun 18, 2021
82a1289
Merge branch 'release' into feature/page-order-api
AnaghHegde Jun 18, 2021
2c3b457
Fix Table Widget Filter issue (#3975)
riodeuno Jun 18, 2021
ef39ae8
Updated Widgets_form_input_table_default_validation.js
arslanhaiderbuttar Jun 18, 2021
8cdbff1
update gifs on readme
vihar Jun 18, 2021
37708a4
Merge pull request #5231 from appsmithorg/snyk-fix-45d4107a9d315a1ce1…
areyabhishek Jun 18, 2021
9ad742e
Change the test method name to more meaningful,.equals for boolean co…
AnaghHegde Jun 18, 2021
32ecffb
Merge remote-tracking branch 'origin/feature/page-order-api' into fea…
AnaghHegde Jun 18, 2021
e6adc27
Merge pull request #5258 from appsmithorg/update-gifs
areyabhishek Jun 18, 2021
598a48c
Migration for createdAt and updatedAt field for userCollection if not…
abhvsn Jun 19, 2021
6358062
[ImgBot] Optimize images (#5260)
imgbot[bot] Jun 21, 2021
3894dbc
Run tests for all approved PRs (#5275)
nidhi-nair Jun 21, 2021
26a7087
Merge remote-tracking branch 'origin/release' into FIX/4731-dragging-…
vibhandikyash Jun 21, 2021
e7f6598
Fix: Log dependent property values in debugger when a property is upd…
akash-codemonk Jun 21, 2021
a9961f0
Merge pull request #5170 from appsmithorg/buttonUITestCases
arslanhaiderbuttar Jun 21, 2021
82a62cf
Merge pull request #4864 from appsmithorg/FIX/4731-dragging-and-dropp…
somangshu Jun 21, 2021
4117aba
[ImgBot] Optimize images (#5277)
imgbot[bot] Jun 21, 2021
c17588f
Merge branch 'release' of github.com:appsmithorg/appsmith into FIX/50…
rahulramesha Jun 21, 2021
96c273c
FEATURE-1726 : Iframe Widget
wmdev0808 Jun 21, 2021
9bc1cd4
Merge branch 'release' into feature/1726-iframe-widget
wmdev0808 Jun 21, 2021
441f42c
Generate linting errors via JSHint (#5034)
hetunandu Jun 21, 2021
a89990e
Mongo For Update Migrations (#5291)
trishaanand Jun 21, 2021
7787a0d
Bug Fix: Fix dynamic binding substitution failure with Firestore `whe…
sumitsum Jun 21, 2021
655918f
Removed intermediate navigation to datasource list page. (#5304)
arunvjn Jun 21, 2021
469d7f0
Fix to enable scroll in sql query results. (#5091)
arunvjn Jun 22, 2021
c4acc05
Remove unused configurations in Netlify
sharat87 Jun 22, 2021
114ad26
Merge pull request #5320 from appsmithorg/sharat87-patch-1
sharat87 Jun 22, 2021
f4b1daa
Use loadash get function to add fall back value to datasource url (#…
arunvjn Jun 22, 2021
d20dec6
Bump ws from 6.2.1 to 6.2.2 in /app/client (#4941)
dependabot[bot] Jun 22, 2021
3c8944c
Merge pull request #4341 from appsmithorg/fix/dropdown-overlap-modal
somangshu Jun 22, 2021
b12cea8
Merge pull request #5167 from appsmithorg/FIX/5073-File-Picker-close-…
rahulramesha Jun 22, 2021
3fb00b6
Added Cypress tests for tab widget (#4345)
NandanAnantharamu Jun 22, 2021
fa9a1bc
Set the order to published pages
AnaghHegde Jun 23, 2021
0d57f3c
Merge branch 'release' into feature/page-order-api
AnaghHegde Jun 23, 2021
a1defb9
Remove the unnecessary comments
AnaghHegde Jun 23, 2021
df38f9d
Merge pull request #5020 from appsmithorg/feature/page-order-api
AnaghHegde Jun 23, 2021
eae2e46
Fix cyclical dependency issue when Api returns an error (#5333)
hetunandu Jun 23, 2021
47bc5aa
Merge pull request #5026 from appsmithorg/feature/1726-iframe-widget
SatishGandham Jun 23, 2021
7fc04f0
Error message when updating duplicate application name modified to gi…
abhvsn Jun 23, 2021
e52680f
Feature/implement comment thread subscriber (#5261)
nayan-rafiq Jun 23, 2021
6b7aef8
Enable total number of rows and page size for server side pagination …
vicky-primathon Jun 23, 2021
dce3a80
Minor fixes for errors (#5361)
hetunandu Jun 23, 2021
fe700a8
Fixed empty area issue when columns are hidden in published mode (#5162)
vicky-primathon Jun 23, 2021
02b1ce6
Create appsmith_templates.md (#4412)
akshayrangasaid Jun 23, 2021
c351643
Notification updates (#5239)
rishabhsaxena Jun 23, 2021
3747d41
Show the associated page name subtly in the omnibar (#5120)
akash-codemonk Jun 24, 2021
599996f
bug/duplicate application name error will be handled (#5316)
pranavkanade Jun 24, 2021
a61b802
Update comments onboarding carousel images (#5373)
rishabhsaxena Jun 24, 2021
29a6136
Set mode for comments (#5372)
rishabhsaxena Jun 24, 2021
9a247f3
Fix bug where some fields are missing for notifications from the API …
nayan-rafiq Jun 24, 2021
b24dd8f
Minor collab fixes (#5271)
rishabhsaxena Jun 24, 2021
7f47848
Fix: Fixes a bug in onboarding flow step 1 (#5363)
akash-codemonk Jun 24, 2021
6ec6f95
API for generating a page with UI based on the structure of a given d…
abhvsn Jun 24, 2021
6640a64
Make the whole window scrollable instead of the main container (#5369)
rishabhsaxena Jun 24, 2021
6ca1590
Adding detailed steps on adding a new plugin (#5388)
mohanarpit Jun 24, 2021
17ababd
Update links on README (#5378)
vihar Jun 24, 2021
662076b
Correcting typo in plugin contribution guide
mohanarpit Jun 24, 2021
950257f
Chart UI test cases (#5370)
arslanhaiderbuttar Jun 24, 2021
b2d4454
Feature: add api key based and bearer token based authentication opti…
sumitsum Jun 25, 2021
e8ba1be
removed quotes from sql templates because of prepared statements bein…
Nikhil-Nandagopal Jun 25, 2021
d9bc68b
chore: Adds Community Call for Jun 24
megaconfidence Jun 25, 2021
9ab1113
Security upgrade node-sass from 4.14.1 to 6.0.1
snyk-bot Jun 27, 2021
d4dfa83
Changes to show multiple messages for a log in the debugger (#5144)
akash-codemonk Jun 28, 2021
cf19b8e
[Feature] Widget Grouping Phase - 3 (Cut Copy Paste) (#5083)
marks0351 Jun 28, 2021
5fe13f5
Onboarding typeform related fixes (#5416)
rishabhsaxena Jun 28, 2021
e930fa5
Added pod label automation for the new iFrame widget (#5440)
somangshu Jun 28, 2021
2370331
Test updated as it was flaky (#5441)
NandanAnantharamu Jun 28, 2021
36c399a
Fix the comment missing issue when new users added to organization (#…
nayan-rafiq Jun 28, 2021
2e96701
Manual test Ideas for GoogleSheets and Mongo DB Form Input (#4857)
YogeshJayaseelan Jun 28, 2021
c5e5666
FIX #4627: updated css to change button widget height when deployed (…
vibhandikyash Jun 28, 2021
b11f0d8
Removed Reload action (#5450)
NandanAnantharamu Jun 28, 2021
648e571
Update/bump node version in the doc (#5455)
ajinkyakulkarni Jun 28, 2021
02e5445
[Mongo Plugin] Raw is now a command option instead of Form vs Raw (#5…
trishaanand Jun 29, 2021
4c3f633
Updated Template
Nikhil-Nandagopal Jun 29, 2021
82fbf1c
Updated Template
Nikhil-Nandagopal Jun 29, 2021
8c2f5f5
Updated Template
Nikhil-Nandagopal Jun 29, 2021
b69fc55
Update README.md
areyabhishek Jun 29, 2021
4974693
added gifs for sharing apps (#5433)
vihar Jun 29, 2021
0ed6a01
[ImgBot] Optimize images (#5467)
imgbot[bot] Jun 29, 2021
da8740f
Update form label changes (#5468)
hetunandu Jun 29, 2021
9b1dbeb
Revert "Enable total number of rows and page size for server side pag…
somangshu Jun 29, 2021
f5cb70e
Bump prismjs from 1.23.0 to 1.24.0 in /app/client (#5458)
dependabot[bot] Jun 29, 2021
95b41f3
Updated Template
Nikhil-Nandagopal Jun 29, 2021
2717176
Added delay after typing in Cypress test (#4168)
NandanAnantharamu Jun 29, 2021
a42e89a
Merge branch 'release-frozen' into release
somangshu Jun 29, 2021
1112c20
Updated Template
Nikhil-Nandagopal Jun 29, 2021
140d6c8
fix: comma-separated splitting of image url in table col of type imag…
techbhavin Jun 29, 2021
132abda
feat: add object fit control (#4986)
Tooluloope Jun 29, 2021
7876967
Fix invalid quotes breaking evaluation (#5413)
hetunandu Jun 29, 2021
40d147d
Feature/editor simplify - API to work with mock data sets (#5421)
AnaghHegde Jun 29, 2021
bdef6e1
Merge pull request #1 from ayushpahwa/release
ayushpahwa Jun 29, 2021
1793585
Merge branch 'appsmithorg:bug/navigate-to-issue-3125' into bug/naviga…
ayushpahwa Jun 30, 2021
30344a1
Added default params to the navigateTo field
ayushpahwa Jul 1, 2021
e434e89
Merge branch 'bug/navigate-to-issue-3125' of github.com:ayushpahwa/ap…
ayushpahwa Jul 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
- Change useEffect hook to use deep cehck for modifiers instead of re…
…fernece equality

- Moemoize getThemeDetails
  • Loading branch information
Satish Gandham committed Jun 1, 2021
commit 6e8338089e47cb05b1cbbb1a3e07917e0eed2c16
25 changes: 14 additions & 11 deletions app/client/src/pages/Editor/Popper.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import React, { useRef, useEffect } from "react";
import styled, { ThemeProvider } from "styled-components";
import { createPortal } from "react-dom";
import PopperJS, { Placement, PopperOptions } from "popper.js";
import { noop } from "utils/AppsmithUtils";
import { draggableElement } from "./utils";
import { ReactComponent as DragHandleIcon } from "assets/icons/ads/app-icons/draghandler.svg";
import { Colors } from "constants/Colors";
import { getThemeDetails, ThemeMode } from "selectors/themeSelectors";
import PopperJS, { Placement, PopperOptions } from "popper.js";
import React, { useEffect, useMemo, useRef } from "react";
import { createPortal } from "react-dom";
import { AppState } from "reducers";
import { useSelector } from "react-redux";
import { getThemeDetails, ThemeMode } from "selectors/themeSelectors";
import styled, { ThemeProvider } from "styled-components";
import { noop } from "utils/AppsmithUtils";
import { draggableElement } from "./utils";

export type PopperProps = {
zIndex: number;
Expand Down Expand Up @@ -60,9 +59,13 @@ export default (props: PopperProps) => {
onPositionChange = noop,
themeMode = props.themeMode || ThemeMode.LIGHT,
} = props;
const popperTheme = useSelector((state: AppState) =>
getThemeDetails(state, themeMode),
// Meomoizing to avoid rerender of draggable icon.
// What is the cost of memoizing?
const popperTheme = useMemo(
() => getThemeDetails({} as AppState, themeMode),
[themeMode],
);

useEffect(() => {
const parentElement = props.targetNode && props.targetNode.parentElement;
if (
Expand Down Expand Up @@ -133,7 +136,7 @@ export default (props: PopperProps) => {
}, [
props.targetNode,
props.isOpen,
props.modifiers,
JSON.stringify(props.modifiers),
props.placement,
disablePopperEvents,
]);
Expand Down