Skip to content

[TSK-1304] Fix active viewlet if viewlet list is empty#3043

Merged
haiodo merged 4 commits into
mainfrom
active-viewlet
Apr 24, 2023
Merged

[TSK-1304] Fix active viewlet if viewlet list is empty#3043
haiodo merged 4 commits into
mainfrom
active-viewlet

Conversation

@s0gorelkov

Copy link
Copy Markdown
Contributor

Contribution checklist

files

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

TSK-1304

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
setActiveViewletId(viewlet._id)

if (viewlet) {
setActiveViewletId(viewlet._id)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@BykhovDenis Should it be set to undefined in this case?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we always should have least one viewlet

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

viewlets are [] by default. So, we don't have viewlets until the viewlets request is completed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should it be better to check for viewlets length before calling update in this case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Anyway, I think it's better to move this func to some util to avoid duplication throughout the project.

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>

# Conflicts:
#	plugins/tracker-resources/src/components/templates/IssueTemplatesView.svelte
@haiodo
haiodo merged commit c1fac81 into main Apr 24, 2023
@haiodo
haiodo deleted the active-viewlet branch April 24, 2023 09:40
MichaelUray pushed a commit to MichaelUray/huly-platform that referenced this pull request Jul 9, 2026
…#3043)

Signed-off-by: Sergei Ogorelkov <sergei.ogorelkov@icloud.com>
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.

3 participants