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

Dojo Resources #778

merged 7 commits into from
May 22, 2020

Dojo Resources #778

merged 7 commits into from
May 22, 2020


Copy link

@agubler agubler commented May 20, 2020

Type: feature

The following has been addressed in the PR:


An Iteration on the initial implementation of Dojo Resources. This looks like a re-write but actually has been consolidated into a single middleware/resources module addressing some conceptual inconsistencies, features and interfaces.

  • All functionality now housed in a one module, @dojo/framework/core/middleware/resources
  • Conceptually change how users work with Dojo Resources, users no longer work directly with the resource (previously using createResource), now Resource Templates are created and passed to resource aware widgets. The resource creation is handled within the resource middleware.
  • All resource data modifications and access is now done via the injected resource controls. There is no return from the ResourceTemplate API functions
  • Interfaces have been consistently named, from the middleware API it's ***Options and ***Result and for the resource template it's ***Request and ***Response
  • Decoupled initialisation options by introducing an optional init API on the resource template to perform any custom behaviour
  • New find capability that enables a template to implement how to find a specific item based on a query, start index and find type (contains, exact and start) along with the current ResourceOptions.
  • New meta API that returns back the current options along with the total set by the resource template.
  • Remove getTotal API from the resource middleware (replaced by meta)
  • getOptions and setOptions have been replaced by options that is accessed by properties() that can get and set options
  • createOptions API to generate new options
  • Provides helpers for creating a memory resource template.
  • Updated the existing resource docs to reflect all the changes
  • Converted existing unit tests and covered further test scenarios

Diff of the changes for dojo/widgets: dojo/widgets@master...agubler:resource-middleware-upgrade

Widget parade deployment:

Copy link

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 183ed68:

Sandbox Source
divine-dream-3ln57 Configuration

Copy link

codecov bot commented May 20, 2020

Codecov Report

Merging #778 into master will increase coverage by 0.03%.
The diff coverage is 98.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #778      +/-   ##
+ Coverage   97.48%   97.51%   +0.03%     
  Files         126      125       -1     
  Lines        7624     7800     +176     
  Branches     1759     1803      +44     
+ Hits         7432     7606     +174     
- Misses        192      194       +2     
Impacted Files Coverage Δ
src/core/middleware/resources.ts 98.76% <98.76%> (ø)
src/core/diff.ts 100.00% <100.00%> (ø)

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 57efcae...183ed68. Read the comment docs.

@agubler agubler requested a review from tomdye May 22, 2020 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants