Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

Conversation

pr3tori4n
Copy link
Contributor

Related Issue: #461

Summary

Abstract render functions too.

@pr3tori4n pr3tori4n requested a review from a team as a code owner November 1, 2019 23:58
@pr3tori4n pr3tori4n self-assigned this Nov 1, 2019
@pr3tori4n pr3tori4n added enhancement New feature request for an existing component refactor labels Nov 1, 2019
@pr3tori4n pr3tori4n changed the title Hrobbins/share render methods between lists 461 PickList and ValueList: share render methods between lists 461 Nov 1, 2019
Copy link
Member

@jcfranco jcfranco left a comment

Choose a reason for hiding this comment

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

giphy

@@ -12,8 +11,7 @@ import {
} from "@stencil/core";
import { ICON_TYPES, TEXT } from "./resources";
import sharedListMethods from "./shared-list-logic";
import { VNode } from "@stencil/core/dist/declarations";
import CalciteScrim from "../utils/CalciteScrim";
import List from "./shared-list-render";
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: Is there a more discoverable location for the common list modules?

Copy link
Contributor Author

@pr3tori4n pr3tori4n Nov 4, 2019

Choose a reason for hiding this comment

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

We could put them in utils maybe? Though I think it'd be about time to start adding sub-folders to utils, which might introduce some file reference refactors in other files.
Maybe src/components/utils/functional-components

Very open to other suggestions

Copy link
Member

@driskull driskull left a comment

Choose a reason for hiding this comment

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

👍

@pr3tori4n
Copy link
Contributor Author

Thanks Franco 😄

@pr3tori4n pr3tori4n changed the base branch from hrobbins/share-more-code-between-lists-461 to hrobbins/change-filter-data-to-fewer-props-461 November 5, 2019 16:59
@pr3tori4n pr3tori4n merged commit 9c2ed74 into hrobbins/change-filter-data-to-fewer-props-461 Nov 5, 2019
@pr3tori4n pr3tori4n deleted the hrobbins/share-render-methods-between-lists-461 branch November 5, 2019 17:08
pr3tori4n added a commit that referenced this pull request Nov 6, 2019
…rops (#461)

* 3 new tests for filter. metadata wip

* change filter data from to selected properties.
Prior was using all attributes.

* add event for modified properties filter depends on

* split filter setup so it can called on prop change

* fix bug in tests

* remove .only from test

* filter: add a warning when there is no data.

* fix getTag to work with no attributes

* add tests for filter

* fix accessibility

* PickList and ValueList: share more code between lists 461 (#484)

* remove .only from test

* fix lint errors

* add temporary backup files to gitignore

* abstract common methods to a shared location

* share selection/deselection tests

* fix shiftClick behavior for valueList

* abstract shared tests between lists

* improve method return type

* normalize render functions

* add this typing to shared logic file
https://stackoverflow.com/questions/54710927/typescript-types-and-bind

* moving compact prop to alpha order

* added typing to items

* add compact property to value list

* fix type error on textHeading

* fix typings

* update lists to use common MO callback
MO: Mutation Observer

* comment touchup

* fix backwards compat and event typing

* add missing typings

* space the tests out

* code review follow up

* abstracted some types

* move comment up

* PickList and ValueList: share render methods between lists 461 (#488)

* fix lint errors

* add temporary backup files to gitignore

* abstract common methods to a shared location

* share selection/deselection tests

* fix shiftClick behavior for valueList

* abstract shared tests between lists

* improve method return type

* normalize render functions

* abstract the render methods to functional comp

* switch value list over to use shared render

* fix calcite-block accessible test.

* update calciteListItemPropsUpdated event docs

* calciteListItemPropsUpdated is internal only
pr3tori4n added a commit that referenced this pull request Nov 6, 2019
…st-render (#400)

* add a console warn and simpler demo file

* 3 new tests for filter. metadata wip

* change filter data from to selected properties.
Prior was using all attributes.

* add event for modified properties filter depends on

* split filter setup so it can called on prop change

* fix bug in tests

* remove .only from test

* filter: add a warning when there is no data.

* fix getTag to work with no attributes

* add tests for filter

* fix accessibility

* change existing demo to advanced demo

* change simple demo to default

* wip demos

* PickList and ValueList: share more code between lists 461 (#484)

* remove .only from test

* fix lint errors

* add temporary backup files to gitignore

* abstract common methods to a shared location

* share selection/deselection tests

* fix shiftClick behavior for valueList

* abstract shared tests between lists

* improve method return type

* normalize render functions

* add this typing to shared logic file
https://stackoverflow.com/questions/54710927/typescript-types-and-bind

* moving compact prop to alpha order

* added typing to items

* add compact property to value list

* fix type error on textHeading

* fix typings

* update lists to use common MO callback
MO: Mutation Observer

* comment touchup

* fix backwards compat and event typing

* add missing typings

* space the tests out

* code review follow up

* abstracted some types

* move comment up

* PickList and ValueList: share render methods between lists 461 (#488)

* fix lint errors

* add temporary backup files to gitignore

* abstract common methods to a shared location

* share selection/deselection tests

* fix shiftClick behavior for valueList

* abstract shared tests between lists

* improve method return type

* normalize render functions

* abstract the render methods to functional comp

* switch value list over to use shared render

* fix calcite-block accessible test.

* update calciteListItemPropsUpdated event docs

* replace attribute logic with properties

* minor demo changes

* clean up demo

* removing redundant warn message

* remove maquette
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature request for an existing component refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants