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

Page builder blocks v2 UI list page blocks #2496

Conversation

neatbyte-vnobis
Copy link
Collaborator

Changes

Add Page Blocks page to Page Builder UI app

How Has This Been Tested?

Manual testing

Documentation

None

@neatbyte-vnobis neatbyte-vnobis mentioned this pull request Jun 22, 2022
51 tasks
Copy link
Member

@adrians5j adrians5j left a comment

Choose a reason for hiding this comment

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

Just a couple of comments.

import React, { useCallback, useMemo, useState } from "react";
import { i18n } from "@webiny/app/i18n";
import { useRouter } from "@webiny/react-router";
import { useQuery } from "@apollo/react-hooks";
Copy link
Member

Choose a reason for hiding this comment

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

Can you clarify please, what is this view? Can you provide a screenshot?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@adrians5j
Copy link
Member

adrians5j commented Jul 6, 2022

Was about to merget this, but I noticed one thing.

@neatbyte-vnobis , should this be "Search categories" here? Maybe "Search blocks" ?

image

@neatbyte-vnobis
Copy link
Collaborator Author

@adrians5j
There we are searching not blocks but categories (left panel list)
But here I may be wrong...
@SvenAlHamad can you clarify?

Design (https://miro.com/app/board/uXjVO1XGqwg=/):
image

@SvenAlHamad
Copy link
Contributor

We are searching for blocks, that’s correct.

@neatbyte-vnobis
Copy link
Collaborator Author

@SvenAlHamad @adrians5j
In such case left panel should be affected too, am I right?
So if we search for "Heading" and there are 3 categories with such blocks - we show 3 categories and only blocks containing "Heading" word.
In such case:

  1. other categories are not shown
  2. counter bellow categories will show number of blocks that are matching search query

I will have to rewrite quite a few things to do it:
now left and right parts of the page are more or less independent (as other similar pages aka categories)
but with such change I need to move all GraphQL queries to parent component (so left and right parts will be using a data from it)
@adrians5j maybe I am missing an easy solution here? Feel free to give me pointer.

@adrians5j
Copy link
Member

@neatbyte-vnobis In all of our views, these search inputs are doing a search over the entity the user's currently looking at.

For example, on the pages view, pages are being searched. On the page categories view, page categories are being searched.

So, if we were to follow the above examples and wanted to stay consistent, typing into the search field would do a search against existing page blocks.

But!

Now when I look at it, I can see that this view IS a bit different than the other ones we have. Instead of just showing blocks in the list, we're showing block categories. Once clicked, the blocks are shown on the right.

And now I do think we need to think about this.

I do agree that this should search for blocks because the user will most probably want to do that (instead of searching for block categories). But I can also see that, in the provided designs, the label said SEARCH CATEGORIES, so I can understand that this might require some changes on your side @neatbyte-vnobis.

So.... what I'd do here now is.......

@SvenAlHamad - please confirm the direction into which we want to move. Do we want to leave it as-is (and save potentially some time), or do we want to revisit this now, and make the search bar do a search over blocks?

Hopefully, I didn't miss anything (like some docs), but yeah, let's first sync on what exactly we want to have here.

@SvenAlHamad
Copy link
Contributor

Ok, let's leave it so it's searching blocks if that's what's currently implemented. Once we start using it a bit I think we'll have then one milestone addressing the initial feedback and some additional polishes.

@adrians5j
Copy link
Member

adrians5j commented Jul 14, 2022

@SvenAlHamad

Actually, the way it's currently implemented is that it's searching for block categories, not blocks.

Miro:
image

Real app:
image

I'd still leave it as is, so we can address it then in the MS you mentioned.

@SvenAlHamad
Copy link
Contributor

Sorry, I miss typed in my previous comment. I DO understand it's searching "block categories" and I'm happy to leave it like that for now.

@adrians5j
Copy link
Member

@neatbyte-vnobis feel free to merge this one.

Thank you!

@neatbyte-vnobis neatbyte-vnobis merged commit 01aefbf into page-builder-blocks-v2 Jul 15, 2022
@neatbyte-vnobis neatbyte-vnobis deleted the page-builder-blocks-v2-UI-list-page-blocks branch November 22, 2022 14:46
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