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

DS 274 Remove bolt dropdown component #2365

Merged

Conversation

MarcinMr
Copy link
Collaborator

Jira

https://pegadigitalit.atlassian.net/browse/DS-274

Summary

The dropdown component is removed completely.

Details

  • After confirming with the team caring for Pega sites there was no usage of bolt-dropdown component in the GitLab.
  • The dropdown component was removed from packages and doc-site.

How to test

Check if there are no instances of dropdown components and if was deleted properly without regressions.

Release notes

The dropdown component is removed.

@github-actions github-actions bot added the type: feature List this PR in the 'Features' section of the release notes. label Oct 22, 2021
@colbytcook colbytcook had a problem deploying to feature/DS-274-remove-bolt-dropdown-component--branch-preview October 22, 2021 10:08 Failure
Copy link
Collaborator

@danielamorse danielamorse left a comment

Choose a reason for hiding this comment

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

@MarcinMr looks good. Ready to approve once you address my comment about the ssr-server file. Thanks!

Also, I updated this branch with the latest from feature/bolt-5-0 to fix the failing Travis build. It needed the new chromedriver.

@@ -135,9 +134,6 @@ async function setupWebpack(config) {
});
}
});

Copy link
Collaborator

Choose a reason for hiding this comment

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

@MarcinMr why were these lines below removed? They don't seem to be related to dropdown.

This whole ssr-server package is unused to it's no big deal, but if these weren't intentionally removed let's revert this part of the PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@danielamorse

Hmm I couldn't remind myself how and why I removed those lines of code... I tried to restore it but every time I save the file, the code removes itself. I checked on a master and it happens either for that file. It looks like this:

the code is grayed out a littlebit
unreachable code 1

and when I hover over it, there is an info msg that the code is unreachable
unreachable code deteckted

Quick fix proposes deleting that code.

Could you please explain why it happens and how can we solve it?

Here is how it behaves on save:
https://user-images.githubusercontent.com/85670248/138850146-7d2f93f0-8119-4ef0-b39d-de95f0aac9c1.mov

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, ok. It is in fact unreachable code and VS Code is automatically removing it.

Anything after a return statement will not run. For example:

myFunctionA() {
  console.log('this will run');
  return 'foo';
  console.log('this will never run');
}

myFunctionB() {
  if (option) {
    return 'foo';
  }
  console.log('this will run only if `option` is falsy');
}

In this file, there is a return statement above the lines you removed, so these lines will never run.

This is fine to remove in this PR 👍

@colbytcook colbytcook merged commit 7c1d4b0 into feature/bolt-5-0 Oct 26, 2021
@colbytcook colbytcook deleted the feature/DS-274-remove-bolt-dropdown-component branch October 26, 2021 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature List this PR in the 'Features' section of the release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants