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

Will/lockfile explorer step3 #3741

Merged
merged 24 commits into from
Nov 18, 2022

Conversation

william2958
Copy link
Contributor

@william2958 william2958 commented Nov 10, 2022

Summary

This MR adds the following changes:

Quality of life improvements

  • Bookmarks + filter text is now persisted across page refreshes
  • Better layout css (hopefully)
  • Added jump forward functionality (works after clicking "Back")

Fixes

  • Determinants + Transitive Referencers are now calculated correctly and calculations are slimmed down by skipping packages that don't have peer dependencies.
  • Fixed a bug where the websocket would not connect and thus Hot-Reloading did not work.

UI Changes

  • Influencers are shown as a clickable list
  • You can click to go view a listed Determinant or Transitive Referrer
  • Added dependency info panel (Above Influencers panel)

Details

How it was tested

@william2958 william2958 marked this pull request as ready for review November 11, 2022 21:43
<div className={styles.Title2}>
<img className={styles.Image} src={require('./lockfile-explorer-title-2.svg')} />
</div>
<div className={styles.Detail}>{appPackageVersion}&nbsp;rushstack.io</div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The old LogoPanel looked like this:
image

In this PR, the layout is changed to be:
image

The 0.0.3 rushstack.io seems a bit confusing, since 0.0.3 is the version of Lockfile Explorer, not Rush Stack.

Also in the original design, I had envisioned that clicking on the words/icon would take you to the NPM page (or https://lfx.rushstack.io ?), whereas clicking on rushstack.io would take you to the other website https://rushstack.io

What do you think? Another consideration is that the Projects/Packages box is the centerpiece of the UI, so we want to provide as much vertical scroll area as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense, I've moved the version next to the lockfile explorer text logo to make it a bit more clear, also I moved the logo to above the bookmarks sidebar as that one is less important than the left panel. The appropriate links have also been added. I moved it away from having it's own column because i felt that it was taking up a lot of horizontal real-estate for a pretty small logo, this way I think gives the app overall more room:

image

<div className={styles.LockfileFilterBar}>
{entryStack.length > 1 ? <button onClick={pop}>back</button> : null}
<h5>filter:</h5>
<h5>Filter:</h5>
Copy link
Collaborator

@octogonz octogonz Nov 17, 2022

Choose a reason for hiding this comment

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

image

Conventionally, tab pages are meant to be like pages of a notebook, each containing its own content & state. So it's slightly unusual that the Filter: _____ (and whatever text that you typed in there) is unaffected when switching between tabs. It might make more sense for the Filter box and back/forward buttons to appear above the tab, to make it more clear that this state affects both the "Projects" and "Packages" tabs. In the same way, the filter checkboxes at the bottom could be moved outside the tab. (When they are inside the tab, it seems to imply that there are distinct checkbox states for Projects and Packages, which is not the case, in the current implementation at least.)

Let me know what you think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I think that makes sense for the Filter to be applicable to each tab individually, so I changed it so that it saves and uses different filter text depending on which tab your in, so they can search for things independently.

As for the checkboxes, I feel that it would make sense that they affect both tabs as the user would probably want to look for the same "hits" across both tabs, but to make it a bit more clear that it's a separate entity I've added a border to separate the list and the filter checkbox area, let me know what you think:

image


export const displaySpecChanges = (specChanges: Map<string, ISpecChange>, dep: string): string => {
switch (specChanges.get(dep)?.type) {
case 'add':
Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, it's possible for the diff to be scrolled out of view, making it not obvious that there is any diff for this entry:
image

Maybe we could provide a visual indicator, for example show * package spec instead of package spec if anything was modified? Maybe we could even show a * in the listview as well:

image

I think these transformations are fairly important information when studying lockfiles, because they are the customizations that we have to fiddle with to fix problems.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an asterisk to the "package spec *" header tab to indicate that there is a diff for the entry, I don't think we should show an asterisk in the list view because we need to load the package's package.json to be able to calculate if there is a spec change, (currently we just load the selected entry's package.json & calculate the spec changes then)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants