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

Adding component file path to debug component comments. #1126

Merged
merged 2 commits into from
Apr 29, 2020

Conversation

jwoertink
Copy link
Member

Purpose

Fixes #1089
Fixes #850

Description

This adds a new method to components to get the file_location of that component. It also now displays that file_location in the HTML comments generated by components when you have HTMLPage render_component_comments turned on. The idea will be to help you locate components a little quicker in larger applications.

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

Copy link
Member

@paulcsmith paulcsmith left a comment

Choose a reason for hiding this comment

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

Niiice. One thought, could we swap these? My thought is that the component itself is a bit easier to read and sometimes files have multiple components.

What do you think?

@jwoertink jwoertink merged commit f137720 into master Apr 29, 2020
@jwoertink jwoertink deleted the features/1089 branch April 29, 2020 15:19
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.

Add file path to component when printing comments Add optional data-trace HTML attribute
2 participants