Skip to content

Conversation

@maier49
Copy link
Contributor

@maier49 maier49 commented Jul 15, 2020

Type: feature

The following has been addressed in the PR:

Description:
Adds a flag to factory's using the resource middleware

  • Uses attributes/properties on the custom element to configure the resource (right now only works if those are not used but does not reserve them)
  • Defaults to a memory template and empty data set
  • Does not expose createTemplate functions since they only provide typing, instead taking a template directly

Example usage here
Resolves dojo/widgets#1481

@maier49 maier49 mentioned this pull request Jul 15, 2020
7 tasks
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 15, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a2ec44e:

Sandbox Source
dojo/dojo-codesandbox-template Configuration

@maier49
Copy link
Contributor Author

maier49 commented Jul 21, 2020

@matt-gadd The prototype now handles everything in the middleware (and has tests). It also occurs to me that with this change to the logic we could also change the type on the resource property to allow passing an object with all the options directly instead of needing a parent that uses the resource middleware to create a resource prop

@maier49 maier49 force-pushed the custom-element-resource-support branch from 562deee to a2ec44e Compare July 21, 2020 17:09
@maier49 maier49 marked this pull request as ready for review July 21, 2020 17:10
@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #815 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #815   +/-   ##
=======================================
  Coverage   97.53%   97.54%           
=======================================
  Files         127      127           
  Lines        7964     7970    +6     
  Branches     1836     1839    +3     
=======================================
+ Hits         7768     7774    +6     
  Misses        196      196           
Impacted Files Coverage Δ
src/core/middleware/resources.ts 98.58% <100.00%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48c87ed...a2ec44e. Read the comment docs.

@maier49 maier49 merged commit d1c1315 into dojo:master Jul 21, 2020
@maier49 maier49 deleted the custom-element-resource-support branch July 21, 2020 19:42
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.

Resource support for Custom Elements

2 participants