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

Complete Marketplace Design #244

Merged
merged 36 commits into from
Jun 9, 2022
Merged

Complete Marketplace Design #244

merged 36 commits into from
Jun 9, 2022

Conversation

dherault
Copy link
Contributor

@dherault dherault commented Jun 1, 2022

Summary

Resolves ENG-118

Finalizes the layout for the "Marketplace" and "Installed" scenes.

image

## Labels

Test Plan

Checklist

  • If required, I have updated the Plural documentation accordingly.
  • I have added tests to cover my changes.
  • I have added a meaningful title and summary to convey the impact of this PR to a user.
  • I have added relevant labels to this PR to help with categorization for release notes.

@dherault dherault added enhancement New feature or request design Any design-related changes labels Jun 1, 2022
@dherault dherault requested a review from dogmar June 1, 2022 19:35
@dherault dherault self-assigned this Jun 1, 2022
@@ -71,6 +78,14 @@ function MarketplaceRepositories({ installed }) {
})
.filter(repository => installed ? repository.installation : true)

const fuse = new Fuse(sortedRepositories, searchOptions)

const resultRepositories = search ? fuse.search(search).map(({ item }) => item) : sortedRepositories
Copy link
Member

Choose a reason for hiding this comment

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

Is this searching in-browser?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this hack works well for now.
In the future we might want to use the open-source version of Algolia 🇫🇷 !

Copy link
Member

Choose a reason for hiding this comment

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

no we should use the api's own search features.

Copy link
Member

Choose a reason for hiding this comment

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

You should now have the categories, publishers and tags fields to do multi-value filtering for all of these via the api. We should definitely strongly prefer that to in-browser filtering

@dherault dherault marked this pull request as ready for review June 5, 2022 15:14
@dherault dherault changed the title Design new advanced layout Complete Marketplace Design Jun 5, 2022
@@ -21,7 +21,7 @@ export function ModalHeader({ text, setOpen }) {
justify="center"
width="2rem"
height="2rem"
hoverIndicator="background-light"
hoverIndicator="fill-one"
Copy link
Member

Choose a reason for hiding this comment

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

the name fill-one seems a little unclear to me, is there a way to make it a little more apparent what that color is acting as?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ask Nick, that's his responsibility

Copy link
Member

Choose a reason for hiding this comment

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

We can bring it up with nick too, but for codebase cleanliness, I do think we should have a mapping of semantic names that correspond to his more systematic ones.

width={areFiltersOpen ? 256 - 32 : 0}
height={`calc(100% - ${32}px)`}
right={0}
width={256 - 32}
Copy link
Member

Choose a reason for hiding this comment

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

is there a reason why we don't just make thse constants?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will

height={`calc(100% - ${32}px)`}
right={0}
width={256 - 32}
height={`calc(100% - ${64 + 8}px)`}
Copy link
Member

Choose a reason for hiding this comment

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

same shouldn't this just be a const?

function renderTags() {
const sortedTags = tags.slice().sort((a, b) => a.name.localeCompare(b.name))
const fuse = new Fuse(sortedTags, searchOptions)
const resultTags = search ? fuse.search(search).map(({ item }) => item) : sortedTags.filter((x, i) => i < nDisplayedTags)
Copy link
Member

Choose a reason for hiding this comment

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

we're definitely not going to be able to load all tags in one fetch in relatively short order, so this should really be moved to utilizing the gql apis properly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm waiting on some green go from the backend team then.

Copy link
Member

Choose a reason for hiding this comment

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

what do you need api wise? I'm pretty sure we do have the capability to filter tags

Copy link
Member

Choose a reason for hiding this comment

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

yep, you can use the q argument for the tags query to filter by a search string

@@ -61,16 +64,33 @@ function MarketplaceRepositories({ installed }) {

const sortedRepositories = repositories.slice()
.sort((a, b) => a.name.localeCompare(b.name))
.filter(repository => categories.length ? categories.includes(repository.category) : true)
.filter(repository => categories.length ? categories.includes(repository.category.toLowerCase()) : true)
Copy link
Member

Choose a reason for hiding this comment

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

sorting should also be delegated to the api

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a ticket for you to do it.

@dogmar
Copy link
Collaborator

dogmar commented Jun 7, 2022

Scrollbar should appear on right edge of browser window. Otherwise, looks great.
Screen Shot 2022-06-07 at 11 05 04 AM

@dherault
Copy link
Contributor Author

dherault commented Jun 7, 2022

Will work on it.

@dogmar
Copy link
Collaborator

dogmar commented Jun 7, 2022

Marketplace scrollbar is good. I should have caught this earlier, but Filters sidebar is overflowing horizontally and showing a horizontal scrollbar.

Screen Shot 2022-06-07 at 1 12 42 PM

@michaeljguarino
Copy link
Member

I'm still seeing the bottom margin for the filters box being far too big, it should be closer to the bottom of the screen

Copy link
Member

@michaeljguarino michaeljguarino left a comment

Choose a reason for hiding this comment

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

This looks good, make sure I have a ticket to fix up the api usage and let's press on.

@dherault dherault merged commit 3372cd9 into www2 Jun 9, 2022
@dherault dherault deleted the advanced-layout-2 branch June 9, 2022 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Any design-related changes enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants