Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Conversation

@mikejolley
Copy link
Member

In progress attempt at #898. Currently only implementing the creation of the block, default placeholders if content/products are missing, and inspector settings.

Attributes and inspector controls I anticipate will be shared are in the assets/js/blocks/products directory. This block itself is under assets/js/blocks/products/all-products. This follows the patterns set by the new reviews blocks.

Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

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

I based #994 on top of this PR, but we never did a review of it, so I left some suggestions/questions below. I'm ok dealing with them in a follow-up if we get less conflicts this way.

line-height: 1;
}
}
/* Moved */
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just remove the file?

font-size: 1em;
font-family: star; /* stylelint-disable-line */
font-weight: 400;
display: -block;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be inline-block?

Suggested change
display: -block;
display: inline-block;

*
* wp-block-{$this->block_name},
* wc-block-{$this->block_name},
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this comment mean?

src/Assets.php Outdated
'isLargeCatalog' => $product_counts->publish > 200,
'limitTags' => $tag_count > 100,
'hasTags' => $tag_count > 0,
'hasProducts' => $product_counts->publish > 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

What would you think about naming this setting as hasPublishedProducts? I think it describes better its value.

*
* @param array $permissions Array of access permissions.
* @param bool $permission Permission.
* @param string $context Context of the request.
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor alignment issue.

* Create withProducts HOC for All Products block

* Add order select and pagination to All Products block

* Go to first page when changing order

* Add HOC test

* Make sure block is updated whem columns/rows change in the editor

* Fix 'SALE' badge positioning

* Remove unnecessary key

* Honor 'perPage' value when generating placeholders

* Make placeholder sizes match rendered block item

* Several CSS improvements

* Remove unused CSS properties

* Move getProducts to hocs utils

* Remove All Products sample-data.json

* Fix order select wrong margin in the editor

* Refactor how loading image gets its size

* Clear products when loadProducts start

* Enhance pagination logic

* Fix placeholder width

* Fix regular_price check

* Set product link max-width

* Implement querystrings for the All Products block (#997)

* Implement querystrings for the All Products block

* Create withWindow HOC

* Add with-window tests

* Use renderFrontend util in All Products block (#1003)

* Add with-window tests

* Use renderFrontend util in All Products block
* Rename properties and components from 'order' to 'sort'

* Rename onOrderChange to onSortChange
@Aljullu Aljullu requested a review from a team October 6, 2019 13:37
* Create withBrowserWindowProp HOC

* Remove unnecessary expect's

* Always pass window prop to propMap if it exists
* Scroll to top when switching pages in All Pages block

* Improve keyboard navigation in the All Products block

* Create withScrollToTop HOC

* Fix variable name typo
@pmcpinto pmcpinto added this to the Sprint 26 milestone Oct 8, 2019
Aljullu and others added 5 commits October 8, 2019 11:31
…1040)

* Create withQueryStringValues HOC and use it in ProductGrid component

* Add tests

* Add comment explaining urlParameterSuffix

* Don't destructure props if only used once

* Move dependencies check outside the HOC

* Update test description

* Remove HOCs no longer used
# Conflicts:
#	src/Assets.php
#	src/RestApi.php
#	src/RestApi/Controllers/Products.php
# Conflicts:
#	package-lock.json
* install @wordpress/data-controls and deepFreeze

* add schema store

* add query-state store

* add collections store

* add bundle entry point (and export store keys and constants)

* add master README.md for new stores

* add bundle configuration and register asset php side

* Add missing param name

Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>

* code style fixes

* remove unnecessary period from test description

* Simplify conditional

* reorder imports (code style)

* reorder imports and codestyle

* refactor using lodash for state utils

* reorder imports

* reorder imports

* reorder dependencies

* reorder dependnecies an remove duplication block

* remove errant tab

* reorder dependencies
@pmcpinto pmcpinto modified the milestones: Sprint 26, Sprint 27 Oct 23, 2019
@nerrad nerrad added the WP 5.3 label Oct 23, 2019
* add control for getting unparsed response from apiFetch

* Modify action so it recieves a response object.

* modify reducer to handle response object

* improve selectors to make headers accessible

- modifys existing `getCollection` to retrieve items from state.
- adds `getCollectionHeader` selector

* update resolvers to handle full response from request

- also adds resolver for `getCollectionHeader`

* update docs for changes

* Improve spacing in doc

Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>

* Fix spacing in inline docs

Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com>

* change `getFromState` to receive an object instead of arguments list.
# Conflicts:
#	package-lock.json
# Conflicts:
#	assets/css/style.scss

These styles were moved into `base/components/product-grid/style.scss`.  I copied in the new breakpoint styles for product-grid.
@nerrad
Copy link
Contributor

nerrad commented Oct 25, 2019

closing this in favor of #1032

@nerrad nerrad closed this Oct 25, 2019
@Aljullu Aljullu deleted the add/all-products-block branch December 3, 2019 14:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants