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

Connect/Remove link buttons should be disabled after first click #1014

Open
vmonakhov opened this issue Aug 11, 2023 · 1 comment
Open

Connect/Remove link buttons should be disabled after first click #1014

vmonakhov opened this issue Aug 11, 2023 · 1 comment
Assignees
Labels
frontend bug is related to frontend optimization something that improves performance or storage space

Comments

@vmonakhov
Copy link

While adding or deleting backref links between perspectives manually, the Connect/Remove button stay enabled after click. So several clicks on Connect button creates several identic links. Withal clicking twice on Remove button leads to error. Would be better to disable these buttons after first click.

Steps to reproduce:

  1. Create own dictionary to be able to add or remove links:
  • dictionary/743/23409/perspective/743/23412/edit
  • Click any "table" icon in Markup column
    2023-08-11_13-49-24
  • Convert to dictionary
    2023-08-11_13-58-36
  • Convert to new dictionary with any params, open the newly created Lexical Entries or Paradigms perspective
  1. Click any non-zero 'Paradigm and contexts' button
    2023-08-11_14-02-53
  2. Follow the link in the opened dialog and try to click twice on Remove button
    2023-08-11_14-09-04

! This leads to error

2023-08-11_14-11-51

  1. Go back to the previous dialog and choose 'Add link' there. Leave the appeared text in the string and click 'search' icon

2023-08-11_14-23-03

  1. Click several times 'Connect' button and note that it still enabled and clickable. Note that several links are created at once (look at the counter in the perspective table p.2).
@vmonakhov vmonakhov added bug something doesn't work as expected. Has sub-labels: regression, backend, frontend, critical frontend bug is related to frontend labels Aug 11, 2023
@vmonakhov vmonakhov self-assigned this Aug 11, 2023
vmonakhov added a commit that referenced this issue Aug 24, 2023
…1014 (#1018)

* cache.evict

* Moved update(cache)

* Fix

* useState

* getEntity

* getEntity

* Fix

* withApollo

* async

* reRender

* reFetching

* queryLexicalEntries

* Fix

* reRender

* console.log

* Minor

* refetch

* Cleanup

* Cleanup

* TableComponent

* TableComponent2

* Fix

* Next step

* Next step

* Cleanup

* is_connectable

* Refetched 'queryPerspective'

* reRenderWrapper

* Fix

* Cleanup
@vmonakhov
Copy link
Author

Partly resolved.
Task is to refetch corresponding queries to run complex re-rendering. This was partly realized using data.refetch() functions for the queries themselves.
But this has just not full effect within the present architecture. It's needed to transform components-classes to components-functions and use hooks instead of composes.
Will be better to use local cache and not query db every time as well.

@vmonakhov vmonakhov added optimization something that improves performance or storage space and removed bug something doesn't work as expected. Has sub-labels: regression, backend, frontend, critical labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend bug is related to frontend optimization something that improves performance or storage space
Projects
None yet
Development

No branches or pull requests

1 participant