Skip to content

Docs for reflection and extensions#379

Merged
jhollinger merged 6 commits intoprocore-oss:mainfrom
jhollinger:ref-ext-docs
Feb 23, 2024
Merged

Docs for reflection and extensions#379
jhollinger merged 6 commits intoprocore-oss:mainfrom
jhollinger:ref-ext-docs

Conversation

@jhollinger
Copy link
Copy Markdown
Contributor

@jhollinger jhollinger commented Jan 17, 2024

See the rendered updates at https://github.com/jhollinger/blueprinter/blob/ref-ext-docs/README.md.

Checklist:

  • I have updated the necessary documentation
  • I have signed off all my commits as required by DCO
  • My build is green

@jhollinger jhollinger marked this pull request as ready for review January 17, 2024 21:35
@jhollinger jhollinger requested review from a team and ritikesh as code owners January 17, 2024 21:35
jmeridth
jmeridth previously approved these changes Jan 31, 2024
Comment thread README.md
Comment thread README.md Outdated
The following class implements all extension hooks. If you have an idea for a new one, open an issue or PR.

```ruby
class ExampleExtension < Blueprinter::Extension
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

any real-life examples that could help sparkle thought process?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we add this link to the readme as well for reference?

Comment thread README.md Outdated
Comment on lines +990 to +1003
def pre_render(object, blueprint, view, options)
# modify or replace object
object
end
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

just thinking if we should move away from the field-level type formatters in favour of extension APIs for future use-cases and provide a set of default extensions OOTB that can be configured?
DateFormatterExtension, CurrencyFormatterExtension comes to mind easily..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Interesting - a "blueprinter-contrib" kind of thing? I guess we could package up any number of extensions and/or formatters.

Comment thread README.md Outdated
jhollinger and others added 6 commits February 20, 2024 11:16
Signed-off-by: Jordan Hollinger <jordan.hollinger@gmail.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@gmail.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
Co-authored-by: Jake Sheehy <jacobjsheehy@gmail.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@gmail.com>
Signed-off-by: Jordan Hollinger <jordan.hollinger@procore.com>
@sandstrom
Copy link
Copy Markdown

Great with reflection docs! I was just trying to find them, and then happily found this PR. Thanks! 😄

@jhollinger jhollinger merged commit 5fbd54f into procore-oss:main Feb 23, 2024
@jhollinger jhollinger deleted the ref-ext-docs branch February 23, 2024 17:41
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.

5 participants