Commit Graph

14 Commits

Author SHA1 Message Date
Keyur Paralkar
2ccd20e1e5
fix: column dragging and column reordering (#20928)
## Description

This PR implements the following changes:
- Move the drag events from the Parent component's useEffect to the
`HeaderCell` component.
- Refactored the code. Inside the table component, we refactored the
code such that when SSP is disabled the component uses `StaticTable` and
when SSP enabled then we use `VirtualTable`.
- It also includes the fix for the following issue. Whenever the user
has a scroll to the bottom of the page, on clicking of add new button it
is expected that the scroll should move to the top but it wasn't
happening.

> Add a TL;DR when description is extra long (helps content team)

Fixes #20858
> if no issue exists, please create an issue and ask the maintainers
about this first


## Type of change


- Bug fix (non-breaking change which fixes an issue)


## How Has This Been Tested?

- Manual
    - Test cases:
        - Column name should appear on update from the property pane
        - reorder whenever SSP is enabled
        - On column re-size
        - When a col is frozen
        - When a col is unfrozen
        - When all the headers or one of them is removed
        - When sorted also should work
        - Enable multi-row selection
        - When in preview mode and back and forth(Check the above cases)
        - When in Deployed mode
- Dragging of columns from the column header should work as expected
both in Deploy and Published mode.
- Cypress

### 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
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] 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
2023-03-05 19:49:44 +05:30
Keyur Paralkar
b22ad3a769
feat: added column freeze and unfreeze functionality to table widget (#18757)
**PRD**:
https://www.notion.so/appsmith/Ability-to-freeze-columns-dd118f7ed2e14e008ee305056b79874a?d=300f4968889244da9f737e1bfd8c06dc#2ddaf28e10a0475cb69f1af77b938d0b

This PR adds the following features to the table widget:

- Freeze the columns to the left or right of the table.(Both canvas and
page view mode).
- Unfreeze the frozen columns. (Both canvas and page view mode).
- Columns that are left frozen, will get unfrozen at a position after
the last left frozen column. (Both canvas and page view mode).
- Columns that are right frozen, will get unfrozen at a position before
the first right frozen column. (Both canvas and page view mode).
- Column order can be persisted in the Page view mode.
- Users can also unfreeze the columns that are frozen by the developers.
- Columns that are frozen cannot be reordered(Both canvas and page view
mode)
- **Property pane changes (Columns property)**:
- If the column is frozen to the left then that column should appear at
top of the list.
- If the column is frozen to the right then that column should appear at
the bottom of the list.
- The columns that are frozen cannot be moved or re-ordered in the list.
They remain fixed in their position.
- In-Page mode, If there is a change in frozen or unfrozen columns in
multiple tables then the order of columns and frozen and unfrozen
columns should get persisted on refresh i.e. changes should get
persisted across refreshes.
2023-02-15 17:12:46 +05:30
Souma Ghosh
12ea1b86ea
feat: Date column type editing for table widget (#19181)
- Integrates Date picker component inside table's date column
- Enables edit mode for date type column in table widget
- Adds all the required Property controls for date picker
- Builds the user flow for date column editing in table widget
2023-01-16 14:53:56 +05:30
Dhruvik Neharia
5c3c5337bb
feat: Dynamic Menu Items - Table Widget (#18945)
## Description

This PR allows adding menu items from a Source for a Menu Button Column
inside the Table Widget.
2022-12-30 16:22:11 +05:30
balajisoundar
f49db2a90e
feat: Provide currentRow access in the table widget select column typ… (#18180) 2022-12-16 10:05:51 +05:30
Pawan Kumar
1821e31943
fix: Theme Stylesheet refactor (#18258)
* fix

* move stylesheet to widget level

* fix types

* fix types

* fix types

* fix types ( thanks to ashit )

* fix type issue

* add config for list widget

* fix jest tests
2022-11-28 10:14:31 +05:30
Souma Ghosh
99dc583514
feat: Resize Image option in Table Widget v2 (#17482)
* feat: Resize image option in Table Widget

* Change default image size from 64px to 32px

* Add cypress tests

* Move Image Size property control under Style tab

* Review changes

* Fix failing cypress tests

* fix prettier issue
2022-10-14 17:51:54 +05:30
balajisoundar
ed1dccaba7
feat: Table widget select column type (#16337) 2022-09-30 09:33:53 +05:30
Souma Ghosh
88fe538a70
feat: Autoassigns column datatype in table widget (#16701)
* feat: Autoassigns column datatype in table widget
- Limited to only number, string and boolean datatypes

* Review changes
Adjust jest tests accordingly

* Adds support for recognising Date type columns
Review changes

* Adds jest test for Date field

* Fix warning

* Adjust cypress tests and add helper method to account for code changes

* Fix failing test
2022-09-29 10:56:08 +05:30
balajisoundar
56d58d8e55
fix: table editaction column should be disabled when injected (#16693) 2022-09-21 17:05:15 +05:30
Keyur Paralkar
fff5c16f89
feat: table widget switch column type (#16262)
* feat: added checkbox column type

* fix: addressed review changes

* feat: added filter for checkbox column type

* fix: checkbox alignment

* fix: horizontal alignement property added for checkbox column type

* test: added cypress test and addressed feedback changes

* fix: add new property cellComponentHorizontalAlignment

* fix: addressed review comments

* fix: changed column type order to alphabetical order

* refactor: removed unused imports

* fix: typings for the dynamic label

* fix: addressed review comments

* feat: added switch column type to table widget

* fix: removed unused imports

* fix: disabled cursor flicker issue

* fix: inline editing for checkbox column type

* fix: addressed QA callouts

* fix: addressed qa callouts

* fix: addressed review callouts

* fix: horizontal alignment issue

* fix: added unsaved marker and cypress test

* fix: alginment issues for the tooltipped wrapped switches

* fix:
* rebase new property pane changes
* cypress test fixes
* added support to dynamically change the section name with the help of function

* fix:
* cypress tests
* rebased new property pane changes for switch column type

* fix: merge conflicts on property section

* fix: address code review callouts

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-09-16 10:04:11 +05:30
balajisoundar
afb9aa93c1
feat: Table widget V2 Inline editing validation for plain text & number column (#15954) 2022-09-13 11:11:59 +05:30
Keyur Paralkar
e7209f06fd
feat: Table widget checkbox column type (#15933)
* feat: added checkbox column type

* fix: addressed review changes

* feat: added filter for checkbox column type

* fix: checkbox alignment

* fix: horizontal alignement property added for checkbox column type

* test: added cypress test and addressed feedback changes

* fix: add new property cellComponentHorizontalAlignment

* fix: addressed review comments

* fix: changed column type order to alphabetical order

* refactor: removed unused imports

* fix: typings for the dynamic label

* fix: addressed review comments

* fix: disabled cursor flicker issue

* fix: inline editing for checkbox column type

* fix: addressed QA callouts

* fix: addressed qa callouts

* fix: addressed review callouts

* fix: horizontal alignment issue

* fix:
* rebase new property pane changes
* cypress test fixes
* added support to dynamically change the section name with the help of function

* fix: type casting issue for sectionName

* fix: addressed review comments

* chore: removed unused imports

* fix: added prop.hidden comparision in the memoized PropertySection component

Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
2022-09-08 16:35:59 +05:30
balajisoundar
a97ab3d9a2
feat: Table widget v2 with support for non-ASCII characters and improved jest coverage (#11307) 2022-07-14 12:32:35 +05:30