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

Allow to disable particular items in ObjectPopup #2824

Merged
merged 3 commits into from
Mar 27, 2023

Conversation

denis-bunakalya
Copy link
Contributor

@denis-bunakalya denis-bunakalya commented Mar 24, 2023

Contribution checklist

Brief description

Checklist

  • - UI test added to added/changed functionality?
  • - Screenshot is added to PR if applicable ?
  • - Does the code work? Check whether function and logic are correct.
  • - Does Changelog.md is updated with changes?
  • - Does the translations are up to date?
  • - Does it well tested?
  • - Tested for Chrome.
  • - Tested for Safari.
  • - Go through the changed code looking for typos, TODOs, commented LOCs, debugging pieces of code, etc.
  • - Rebase your branch onto master and upstream branch
  • - Is there any redundant or duplicate code?
  • - Are required links are linked to PR?
  • - Does new code is well documented ?

Related issues

A list of closed updated issues

Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
@haiodo
Copy link
Member

haiodo commented Mar 24, 2023

@denis-bunakalya I do not like this idea at all.

@denis-bunakalya
Copy link
Contributor Author

denis-bunakalya commented Mar 24, 2023

@denis-bunakalya I do not like this idea at all.

Any reason? We need it to show all the selected items, but disable editing for some of them. If we would show only editable items, user sometimes won't see other previously selected items, which are not editable for him

@haiodo
Copy link
Member

haiodo commented Mar 24, 2023

So you need to disallow deselection of some of items?
In this case you need name it differently, since it is confusing.

And potentially it should be shown differently in control.

Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
@denis-bunakalya
Copy link
Contributor Author

So you need to disallow deselection of some of items? In this case you need name it differently, since it is confusing.

And potentially it should be shown differently in control.

Done

@@ -58,6 +58,7 @@

export let create: ObjectCreate | undefined = undefined
export let readonly = false
export let forbiddenDeselectItemIds: Set<Ref<Doc>> = new Set()
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
export let forbiddenDeselectItemIds: Set<Ref<Doc>> = new Set()
export let disallowDeselect: Ref<Doc>[]| undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: Denis Bunakalya <denis.bunakalya@xored.com>
@haiodo haiodo merged commit ed96300 into main Mar 27, 2023
@haiodo haiodo deleted the disable-particular-items-object-popup branch March 27, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants