Commit Graph

24 Commits

Author SHA1 Message Date
Aman Agarwal
72c4b4d996
fix: gsheet preview data UI using tabs for preview and configuration (#28318) 2023-11-03 19:15:00 +05:30
Ivan Akulov
424d2f6965
chore: upgrade to prettier v2 + enforce import types (#21013)Co-authored-by: Satish Gandham <hello@satishgandham.com> Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
## Description

This PR upgrades Prettier to v2 + enforces TypeScript’s [`import
type`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export)
syntax where applicable. It’s submitted as a separate PR so we can merge
it easily.

As a part of this PR, we reformat the codebase heavily:
- add `import type` everywhere where it’s required, and
- re-format the code to account for Prettier 2’s breaking changes:
https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes

This PR is submitted against `release` to make sure all new code by team
members will adhere to new formatting standards, and we’ll have fewer
conflicts when merging `bundle-optimizations` into `release`. (I’ll
merge `release` back into `bundle-optimizations` once this PR is
merged.)

### Why is this needed?

This PR is needed because, for the Lodash optimization from
7cbb12af88,
we need to use `import type`. Otherwise, `babel-plugin-lodash` complains
that `LoDashStatic` is not a lodash function.

However, just using `import type` in the current codebase will give you
this:

<img width="962" alt="Screenshot 2023-03-08 at 17 45 59"
src="https://user-images.githubusercontent.com/2953267/223775744-407afa0c-e8b9-44a1-90f9-b879348da57f.png">

That’s because Prettier 1 can’t parse `import type` at all. To parse it,
we need to upgrade to Prettier 2.

### Why enforce `import type`?

Apart from just enabling `import type` support, this PR enforces
specifying `import type` everywhere it’s needed. (Developers will get
immediate TypeScript and ESLint errors when they forget to do so.)

I’m doing this because I believe `import type` improves DX and makes
refactorings easier.

Let’s say you had a few imports like below. Can you tell which of these
imports will increase the bundle size? (Tip: it’s not all of them!)

```ts
// app/client/src/workers/Linting/utils.ts
import { Position } from "codemirror";
import { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```

It’s pretty hard, right?

What about now?

```ts
// app/client/src/workers/Linting/utils.ts
import type { Position } from "codemirror";
import type { LintError as JSHintError, LintOptions } from "jshint";
import { get, isEmpty, isNumber, keys, last, set } from "lodash";
```

Now, it’s clear that only `lodash` will be bundled.

This helps developers to see which imports are problematic, but it
_also_ helps with refactorings. Now, if you want to see where
`codemirror` is bundled, you can just grep for `import \{.*\} from
"codemirror"` – and you won’t get any type-only imports.

This also helps (some) bundlers. Upon transpiling, TypeScript erases
type-only imports completely. In some environment (not ours), this makes
the bundle smaller, as the bundler doesn’t need to bundle type-only
imports anymore.

## Type of change

- Chore (housekeeping or task changes that don't impact user perception)


## How Has This Been Tested?

This was tested to not break the build.

### Test Plan
> Add Testsmith test cases links that relate to this PR

### Issues raised during DP testing
> Link issues raised during DP testing for better visiblity and tracking
(copy link from comments dropped on this PR)


## Checklist:
### Dev activity
- [x] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] PR is being merged under a feature flag


### QA activity:
- [ ] Test plan has been approved by relevant developers
- [ ] Test plan has been peer reviewed by QA
- [ ] Cypress test cases have been added and approved by either SDET or
manual QA
- [ ] Organized project review call with relevant stakeholders after
Round 1/2 of QA
- [ ] Added Test Plan Approved label after reveiwing all Cypress test

---------

Co-authored-by: Satish Gandham <hello@satishgandham.com>
Co-authored-by: Satish Gandham <satish.iitg@gmail.com>
2023-03-16 17:11:47 +05:30
Vemparala Surya Vamsi
f9e58f2ad0
fix: table border issue fix (#18339) (#19967)
Added a bottom border to the entire table header div element
2023-01-27 12:15:44 +05:30
Pawan Kumar
809a633306
feat: App Theming (#9714)
* fix style bugs

* fix select styles

* test: fix font size issue for cypress tests

* incorporate ashit feedback

* test: addresed review comments for cypress tests

* add analytics events

* height issue in view mode

* incorporate code review feedbacks

* incorporate code review feedbacks

* refactor: addressed review comments; removed border radius and box shadow for text widget; Updated migrations

* feat: Makes shadow and radius controls keyboard accessible (#11547)

* makes shadow and radius controls keyboard accessible

* removes unused imports

* moves options out of render method

* fix: changed the misnomer background property name to the relevant property name

* fix: border radius issue for the map widget

* address qa bugs

* address qa bugs

* fix ux of theming pane when widget is selected

* fix:
* added backgroundColor to the video widget
* restricted pop-over border radius to 0.375rem
* added box shadow for the input group for select widget

* fix: added delete icon in the delete theme modal

* address qa bugs

* change checkbox column size in config

* add js convertible to button color

* remove unused imports

* test: fixed jest tests

* fix primary color typo

* fix: migrations for the theming

* fix:
* Removed background color from MultiTreeSelect and TreeSelect component.
* grouped button's menu button pop over border radius restricting to 0.375rem.

* test: updated Dsl migration UT

* address qa bugs

* address qa bugs

* fix: address qa comments

* address qa bugs

* fix:
* migration issue;
* unit test cases;

* fix rating widget scroll issue

* fix youtube video border radius bug

* fix select widget

* fix select widgets styles

* address qa bugs

* merge conflicts

* makes the reset button keyboard accessible (#12134)

* -resolved merge conflicts

* address qa bugs

* fix: labelTextSize migration fixes

* refactor:
* made changes to the fontSizeUtils function
* fixed the issue related to unit tests

* fix button group widget

* remove unused imports

* fix: fixed the text size migration for the table widget

* refactor: addressed review comments for the table widget theming migration

* fix button group widget

* add init calls for view mode

* json form init theme changes

* fix: added migration for boxShadow, borderRadius and textSizes for table widget

* fix broken fields

* test: fixed unit tests

* wip

* inconsistancy fixes and schemaItem update in updateHook/fieldConfiguration

* feat: init json form migration theming

* json form primaryColor -> accentColor

* update table widget

* update table widget

* object field label styling

* fix: migration related to the JSON form

* fix: fixed labelTextSize migration for JSON form nested widgets

* property control nested stylesheet lookup

* JSONForm label styles form array items

* show label for checkbox field array item

* fix button group widget

* wip

* refactor: addressed table widget review comments

* refactor: addressed ashit review comments;
* added childStylesheet for widgets

* feat: Keyboard navigable Color Picker control (#11797)

* Makes ColorPicker keyboard accessible

* seperate out keyboard and mouse interactions

* fix issue with not focusing back to input

* Adds test for Color picker

* chore: added comment for the boxShadow property

* fix:
* added unit test cases for the widget and property utils
* resolved warning messages

* wip

* theme config update

* fix merge conflicts

* refactor: moved theming migration inside the migrations folder

* fix qa bugs

* fix jest test

* fix: unit test cases

* fix table column creation logic

* refactor: addressed review comments for migrations

* fix: Overriding margin and padding for custom render in the dropdown component (#12875)

* * fix for custom render padding and margin in ADS dropdown

* * fix for removing padding from normal render options

* refactor: moved the boxShadow condition to the variable

* fix qa bugs

* fix: migration QA callouts for audio recorder widget

* refactor: added updated comments for boxShadow migration for table widget

* fix theme binfings for JSONForm fields under Object

* fix table widget theming bug

* fix: addressed code review comments

* fix: unit test cases

* fix: qa migration callouts

* fix table widget theming bug

* fix JSONForm currency input dropdown not submit form

* Added new tests - AppThemingSpec

* fix qa bugs

* fix unit test

* fix JSONForm cellBorderWidth to have default value post migration

* fix unit test

* fix qa bugs

* remove unused imports

* fix qa bugs

* fix JSONForm input height issue

* fix qa bugs

* Updating Theming spec

* * dropdown color fixes (#13249)

* fix caching issue
;

* Fixed Theming tests

* fix tests

* fix tab widget tests

* fix: json form children level migration issue

* fix table widget tests

* Updated test

* updated tests

* updated test

* updated tests

* updated tests

* updated pageload

* fix cypress tests

* remove cypress created files

* fix color picker issues

* Failure fixes

* Fixed some more tests

* fix: cypress test failures

* fix tests

* remove consoles

* fix table tests

* fix qa bugs

* updating snapshots for AppPageLayout_spec as per new UI

* fix rating widget bug

* fix qa bugs

* fix:
* cypress failing tests
* Migration QA callouts
* Removed unused imports

* update constract check algo

* fix color contrast issue

* fix: cypress failure test cases

* update font sizes labels

* fix regression bugs

* fix:
* JSON form labelTextSize issue fix
* Updated comment for the fontSizeUtility function
* migrations issues related to table widget borderRadius and boxShadow

* fix: default labelTextSize issue for the Input and Select families

* fix regression bugs

* fix regression bugs

* PassingParams spec - added wait time

* fix: font family default value issue on JS toggle

* fix js toggle issue in text widget

* fix tests

* fix tests

* fix tests

* fix cypress tests

* fix regression bugs

* fix regression bugs

* fix:
* refactored table widget migration function as per review comments,
* added default value to the widget

* fix: failing unit test cases

* fix theming spec

* fix cypress tests

* test: fixed failed cypress test

* incorporate ashit feedback

* fix cypress tests

* fix: addressed review comments

* comment out table cypress test

* fix merge conflicts

* comment out color picker tests

Co-authored-by: Pawan Kumar <pawankumar@Pawans-MacBook-Pro.local>
Co-authored-by: keyurparalkar <keyur@appsmith.com>
Co-authored-by: Aswath K <aswath@appsmith.com>
Co-authored-by: Nayan <nayan@appsmith.com>
Co-authored-by: Ashit Rath <ashit@appsmith.com>
Co-authored-by: balajisoundar <balaji@appsmith.com>
Co-authored-by: albinAppsmith <87797149+albinAppsmith@users.noreply.github.com>
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
Co-authored-by: apple <nandan@thinkify.io>
Co-authored-by: Parthvi Goswami <parthvigoswami@Parthvis-MacBook-Pro.local>
2022-05-04 15:15:57 +05:30
Tolulope Adetula
a892aa678d fix: Table Multiselect checkbox alignment 2022-04-19 09:40:42 +01:00
Bhavin K
3575a03005
fix: updated cursor style in actionWrapper (#12850) 2022-04-18 11:39:11 +05:30
Ayangade Adeoluwa
bc8d885813
feat: Response view switcher for all action editors (#9629)
* Response view switcher for all action editors

* fixes prettier issue

* adds correct type to responseDataTypes property

* fix some more conflicts

* Try a new  multi switch component

* Revert multiswitch changes

* Adds finishing touches

* remove warnings

* Fixing bugs, reusing logic
2022-04-08 16:32:34 +00:00
Tolulope Adetula
99a5b8ca69
Merge pull request #12356 from appsmithorg/fix/table-widget-scroll-issue
fix: remove unnecessary horizontal scroll when table columns fit within table widget width and prevent unnecessary re-renders
2022-04-07 19:46:43 +01:00
Yash Vibhandik
7736daf0a5
fix: 8385 added button variant support in table column type button (#9164) 2022-04-07 16:19:51 +00:00
Bhavin K
787df868bb
Revert "fix: #6518 Implemented responsive table header controls (#10971)" (#12583)
This reverts commit 88ad2bcbd1.

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-04-06 11:07:13 +05:30
Tolulope Adetula
f7018314ab
Merge pull request #12541 from appsmithorg/fix/Align-Table-widget-URL-Column-type
fix: align Table widget URL Column type
2022-04-05 13:54:14 +01:00
Tolulope Adetula
470fd8da21 fix: Align Link icon with text 2022-04-05 12:22:33 +01:00
Yash Vibhandik
88ad2bcbd1
fix: #6518 Implemented responsive table header controls (#10971) 2022-04-04 18:47:45 +05:30
Tolulope Adetula
ed7369493f fix: use default HTML ellipsis 2022-04-01 08:07:25 +01:00
Tolulope Adetula
c0569b4a76 Fix: table widget scroll issue 2022-03-31 09:23:07 +01:00
Tolulope Adetula
5a87430e6a fix: table widget scroll when not needed 2022-03-30 01:40:56 +01:00
Arsalan
ec62586a44 fix: Replace GREY_4 with GREY_8 2022-03-18 16:23:02 +05:30
Tolulope Adetula
b17cd2e3bd
fix: table widget value displacement (#11650) 2022-03-07 22:06:32 -08:00
Vicky Bansal
43441bfce2
feat: add tooltip to column header text which overflows (#10666)
* feature: add tooltip to column header text which overflows (#10495)

* remove unused import

* feature: add tooltip to column header text which overflows (#10495)

* remove unused styled components

* remove unused import

* feature: add tooltip to column header text which overflows (#10495)

* remove unused styled components

* remove unused import

* Fix cypress command to handle the new changes

* Fix cypress command to handle the new changes

* Fix cypress command to handle the new changes

* Fix: test issues

Co-authored-by: Tolulope Adetula <31691737+Tooluloope@users.noreply.github.com>
2022-03-04 00:56:16 -08:00
Anand Srinivasan
8c60a8b870
feat: unified style for disabled widgets (#8731)
* basic input fields - unified disabled style

* select widgets - unified disabled style

* icon button - change disabled color

* radio group and switch - unified disabled style

* checkbox, radio, switch - disabled label color

* change disabled text color for all input fields

* chnage lable color on disabled state

* RTE header - not allowed cursor on disabled mode

* currency label - disabled color change

* switch and radio group css clean up

* replace text colors with GREY shades

* change label color for disabled switch and radio group

* restructure numeric input css

* numeric input buttons updated

* css fixes for mozilla

* table button disabled color

* change label color - numeric input dropdown

* hover only when enabled - numeric input

* all button colors updated

* remove unwanted wrapper

* update label color

* name color in constants

* use grey palette for switch component color
2021-11-15 11:59:06 +05:30
Alyssa Holland
fe73e97206
fix: Enhance sort icon (layout) in Table widget (#8140) 2021-11-03 16:15:02 +05:30
Anand Srinivasan
9e55ca9ff0
fix: table widget design (#8426)
* Table - multi-select checkbox and selected row color update

* table: change hoverstyle on multi-select checkbox

* re-order conditions

* table widget: use px for positioning checkbox

* change hover style for unselected row

* check box remains white on hover

* fix cypress test

* table search box - highlight on active

* search cancel icon updated

* move svg to assets folder
2021-10-26 14:01:27 +05:30
albinAppsmith
71886c3b9e
feat: Property pane dropdown overflow issues (#8236)
* * hide subtext for date picker fix
* EE clicking on entity, unfolding/folding added

* * bug fixes in action dropdown

* bug fix for cursor

* fix: 8190 background api request and welcome helper button (#8281)

* chore: Move action/js debugger tabs related logic to a common component (#8199)

* removed background of api request textbox and added hover text on "no thanks" button

Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>

* fix: added scrolling in invited users more popup (#8226)

* added scrolling in invited users more popup

* always scrollbar displaying on invited users pan

* fixed issue related with 8190

* updated cursor of invited users more

* replace edit data source icon with remix icon (#8192)

* * active text color

* fix: dropdownlist props issue (#8322)

* Commented failing JS tests (#8276)

Co-authored-by: Yatin Chaubal <yatin.chaubal@gmail.com>

* docs: Update ServerSetup.md (#8255)

* Make port customizable from env variable (#8288)

* fix: issue with string templates (#7848)

* Remove bracket highlight on error

* fix string template issue

* using string template to join strings

* fix breaking tests

* fixed props pass issue

Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Co-authored-by: Yatin Chaubal <yatin.chaubal@gmail.com>
Co-authored-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Vinod <4994565+vnodecg@users.noreply.github.com>

* * bug fixes

* * bug fix

* * test cases fix

* - test case fix

* * test fixes

* * bug fix in test case

Co-authored-by: haojin111 <63215848+haojin111@users.noreply.github.com>
Co-authored-by: akash-codemonk <67054171+akash-codemonk@users.noreply.github.com>
Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
Co-authored-by: Yatin Chaubal <yatin.chaubal@gmail.com>
Co-authored-by: Abhishek Choudhary <shreemaan.abhishek@gmail.com>
Co-authored-by: Shrikant Sharat Kandula <shrikant@appsmith.com>
Co-authored-by: Vinod <4994565+vnodecg@users.noreply.github.com>
Co-authored-by: Arpit Mohan <arpit@appsmith.com>
2021-10-11 11:31:05 +05:30
Abhinav Jha
b49f5097c6
refactor: Widget Development API (#6405) 2021-09-09 20:40:22 +05:30