Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 1
feat(decorator): add search support#21
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b119182
fix: move schema decorator to customizer
matthv 2460924
feat(context): add section context
matthv b19bd08
feat(search): add new search decorator
matthv 3e4025d
feat(collection): update search_collection
matthv e9af3ba
chore: add tests on search_collection_decorator
matthv ac23515
refactor: search_collection_decorator private methods
matthv 2eebcc1
fix: collection attribute schema accessibility
matthv f503a92
feat(agent): add pack_id(s) methods on Id Utils
matthv 66779e9
feat(parser): add parse_search & parse_search_extended on QueryString…
matthv 7f97f86
fix: list test (add decorators attributes on response)
matthv 76eb634
fix: list on active record
matthv e361300
fix: test base collection
matthv a577943
fix: test
matthv 87b8a1e
fix: typo
matthv ecd66a1
fix: test
matthv a6a509e
chore(customization_context): remove useless comment and reader for c…
matthv 617f086
chore: add test on utils id
matthv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 25 additions & 3 deletions
28 packages/forest_admin_agent/lib/forest_admin_agent/routes/resources/list.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13 packages/forest_admin_agent/lib/forest_admin_agent/utils/id.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17 packages/forest_admin_agent/lib/forest_admin_agent/utils/query_string_parser.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4 packages/forest_admin_agent/spec/lib/forest_admin_agent/routes/resources/list_spec.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32 packages/forest_admin_agent/spec/lib/forest_admin_agent/utils/id_spec.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94 packages/forest_admin_agent/spec/lib/forest_admin_agent/utils/query_string_parser_spec.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6 ...min_datasource_customizer/lib/forest_admin_datasource_customizer/collection_customizer.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16 ..._customizer/lib/forest_admin_datasource_customizer/context/agent_customization_context.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| module ForestAdminDatasourceCustomizer | ||
| module Context | ||
| class AgentCustomizationContext | ||
| attr_reader :caller | ||
| def initialize(datasource, caller) | ||
| @real_datasource = datasource | ||
| @caller = caller | ||
| end | ||
| def datasource | ||
| RelaxedDataSource.new(@real_datasource, @caller) | ||
| end | ||
| end | ||
| end | ||
| end |
14 changes: 14 additions & 0 deletions
14 ...omizer/lib/forest_admin_datasource_customizer/context/collection_customization_context.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| module ForestAdminDatasourceCustomizer | ||
| module Context | ||
| class CollectionCustomizationContext < AgentCustomizationContext | ||
| def initialize(collection, caller) | ||
| super(collection.datasource, caller) | ||
| @real_collection = collection | ||
| end | ||
| def collection | ||
| RelaxedCollection.new(@real_collection, @caller) | ||
| end | ||
| end | ||
| end | ||
| end |
12 changes: 12 additions & 0 deletions
12 ...zer/lib/forest_admin_datasource_customizer/context/relaxed_wrappers/relaxed_collection.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| module ForestAdminDatasourceCustomizer | ||
| module Context | ||
| module RelaxedWrappers | ||
| class RelaxedCollection | ||
| def initialize(collection, caller) | ||
| @collection = collection | ||
| @caller = caller | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end |
18 changes: 18 additions & 0 deletions
18 ...er/lib/forest_admin_datasource_customizer/context/relaxed_wrappers/relaxed_data_source.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| module ForestAdminDatasourceCustomizer | ||
| module Context | ||
| module RelaxedWrappers | ||
| class RelaxedDataSource | ||
| def initialize(datasource, caller) | ||
| @real_datasource = datasource | ||
| @caller = caller | ||
| end | ||
| # Get a collection from a datasource | ||
| # @param name the name of the collection | ||
| def get_collection(name) | ||
| RelaxedCollection.new(@real_datasource.get_collection(name), @caller) | ||
| end | ||
| end | ||
| end | ||
| end | ||
| end |
1 change: 1 addition & 0 deletions
1 ...tasource_customizer/lib/forest_admin_datasource_customizer/decorators/decorators_stack.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4 ...ors/schema/schema_collection_decorator.rb → ...ors/schema/schema_collection_decorator.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.