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

Fix: keep the filter edition open if it is empty #2986

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

CzhCN0
Copy link
Contributor

@CzhCN0 CzhCN0 commented Dec 14, 2023

Closes #2967

filtersDraft.splice(existingFilterIndex, 1);
return filtersDraft;
}
// Fixes #2967: Keep the filter edition open if it is empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using this kind of comment is generally considered a bad practice because git is already doing that job for us with blaming and proper commit messages.

We can remove this code.

@@ -61,6 +61,13 @@ export const EditableFilterDropdownButton = ({
removeViewFilter(viewFilter.fieldMetadataId);
};

const onClickOutside = useCallback(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our handlers are always named with handleXYZ, so in this case it would be handleDropdownClickOutside.

Copy link

CLA

Hello there and welcome to our project!
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.
Although we don't have a dedicated legal counsel, having this kind of agreement can protect us from potential legal issues or patent trolls.
Thank you for your understanding.

Generated by 🚫 dangerJS against 8bda0c2

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looking good! Thanks for the help, it's much appreciated :)

@charlesBochet charlesBochet merged commit 18b2e2b into twentyhq:main Dec 15, 2023
10 checks passed
lakshay-saini-au8 pushed a commit to lakshay-saini-au8/twenty that referenced this pull request Dec 16, 2023
Co-authored-by: 曹志浩 <caozhihao@quyiyuan.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
charlesBochet added a commit that referenced this pull request Dec 19, 2023
* feat: add Settings/Accounts/New  section with empty state

* fix: added label for Empty State Card

* On RecordTable, if I have no records, the Record Table Layout is not broken (#2911)

* On RecordTable, if I have no records, the Record Table Layout is not broken

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Revert scrollbar changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* fix + button

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Revert unwanted changes

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Merge main

Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* On RecordTable, if I have no records, the Record Table Layout is not broken

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Add bottom border

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Always show + button

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>

* Fix according to PR

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>

* Add jest tests for twenty-front (#2983)

* Add jest tests for twenty-front

Co-authored-by: v1b3m <vibenjamin6@gmail.com>

* Fix tests

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>

* feat: select default Unit for Currency field (#2996)

Closes #2347

Co-authored-by: Thais GUIGON <thaisguigon@macbook-pro.home>

* Remaining UI docs (#2997)

* remaining UI docs

* completed ui component docs

---------

Co-authored-by: Charles Bochet <charles@twenty.com>

* Fix CIs (#3004)

* Fix CIs

* Fix docs

* Fix eslint-build

* Move file

* Move back

* Fix server ci

* Fix server ci

* Fix server ci

* Fix server ci

* Deactivate e2e tests

* Fix front

* Fix front

* Fix front

* Add twenty-zapier and twenty-utils to the yarn project

* fix

* fix

* Remove pull_request trigger

* Fix ExceptionHandler requiring httpAdapter (#3021)

* Disable chromatic CI

* Disable Danger CI on push trigger (#3024)

Disable Danger CI on main

* feat: add Show Page Emails tab (#2962)

* feat: add Show Page Emails tab

Closes #2926, Closes #2927

* feat: review - disable Emails tab if messaging not enabled

* refactor: review - add FeatureFlagKey type

---------

Co-authored-by: Thais GUIGON <thaisguigon@macbook-pro.home>

* 2880 timebox create a poc to fetch emails from the gmail api (#2993)

* create empty service

* getting threads is working

* insert message channel

* save threads in the db

* clean

* fetch messages

* create a service to fetch a batch of messages

* batch messages

* use httpService instead

* parse batch

* base 64 decoding working

* solve parsing bug

* saving messages is working

* bug to fix in fetchAllByBatches

* fetching all messages is working but not saving yet

* fecth 500 messages and threads is working

* remove unused package and console log

* set direction to incoming

* fix bug after merging main

* Fix modified files DangerCI (#3025)

- fix modified files

* feat: add Show Page Emails preview (#2964)

* feat: add Show Page Emails preview

Closes #2928

* refactor: review - rename StyledContainer to StyledCardContent

* 2915 rest api documentation (#3020)

* Init rest-api page

* Add ugly form to fetch open api schema

* Clean code

* Make the form design more acceptable

* Update doc

* Use local storage

* Update design

* Add isLoading

* Fix typo

* Fix long lines

* Code review returns

* Remove staging and local url from servers

* 2982-feat: Clear SelectableList reset scoped state (#2987)

* 2982-feat: Clear SelectableList reset scoped state

* State fixes as suggested in pr

* State fixes as suggested in pr

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>

* Fix docusaurus style overriden by spotlight/element (rest api playground) (#3033)

* Fix docusaurus style overriden by spotlight/element (rest api playground)

* Fix spacing

* Fix spacing

* Fix: keep the filter edition open if it is empty (#2986)

Co-authored-by: 曹志浩 <caozhihao@quyiyuan.com>
Co-authored-by: Charles Bochet <charles@twenty.com>

---------

Co-authored-by: Lakshay saini <lakshay.saini@finmo.net>
Co-authored-by: gitstart-twenty <140154534+gitstart-twenty@users.noreply.github.com>
Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Thaïs <guigon.thais@gmail.com>
Co-authored-by: Thais GUIGON <thaisguigon@macbook-pro.home>
Co-authored-by: Nimra Ahmed <50912134+nimraahmed@users.noreply.github.com>
Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
Co-authored-by: bosiraphael <71827178+bosiraphael@users.noreply.github.com>
Co-authored-by: brendanlaschke <brendan.laschke@googlemail.com>
Co-authored-by: martmull <martmull@hotmail.fr>
Co-authored-by: Kanav Arora <kanavarora1515@gmail.com>
Co-authored-by: Cao Z.H <150761799+CzhCN0@users.noreply.github.com>
Co-authored-by: 曹志浩 <caozhihao@quyiyuan.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keep the filter edition open if it is empty
3 participants