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

Changing rails helper example to view component #674

Merged
merged 3 commits into from
Oct 14, 2021

Conversation

jonrohan
Copy link
Member

I want to change the Ruby implementation example on the octicons pages to point to usage of the Octicon View Component. Our goal in dotcom is to deprecate use of the helper and probably deprecate the package afterwards.

Copy link
Contributor

@ashygee ashygee left a comment

Choose a reason for hiding this comment

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

Looks good to me @jonrohan! 🚀

@jonrohan jonrohan merged commit ac87d39 into main Oct 14, 2021
@jonrohan jonrohan deleted the octicon_rails_view_component branch October 14, 2021 15:59
@benkoshy
Copy link
Contributor

benkoshy commented Oct 21, 2021

@jonrohan Hi Jon

In order to use the Octicons without the rails helper - I presume that the require "octicons" must be placed in an initializer file somewhere (?) so that Primer::OcticonComponent.new(:check) is available in rails views (erb)? Right now, I am getting a uninitialized constant #<Class:0x0000558aabfe5408>::Primer error, was wondering how that could be fixed: a pointer would be appreciated. also i'm happy to work on a PR if required. chrs, Ben

@jonrohan
Copy link
Member Author

@jonrohan Hi Jon

In order to use the Octicons without the rails helper - I presume that the require "octicons" must be placed in an initializer file somewhere (?) so that Primer::OcticonComponent.new(:check) is available in rails views (erb)? Right now, I am getting a uninitialized constant #<Class:0x0000558aabfe5408>::Primer error, was wondering how that could be fixed: a pointer would be appreciated. also i'm happy to work on a PR if required. chrs, Ben

You should be able to follow the directions for installation here. https://primer.style/view-components/#installation

benkoshy added a commit to benkoshy/octicons that referenced this pull request Oct 21, 2021
### Why this change?

* To clarify installation instructions: 

Usage of Rails view helpers to render octicons are discouraged as per primer#674 - but legacy users might be confused as to how to make it work - given it worked previously. This PR seeks to address any doubts raised. I hope it is useful, if not feel free to close.

rgds
Ben
jonrohan added a commit that referenced this pull request Oct 23, 2021
* update: installation instructions

### Why this change?

* To clarify installation instructions: 

Usage of Rails view helpers to render octicons are discouraged as per #674 - but legacy users might be confused as to how to make it work - given it worked previously. This PR seeks to address any doubts raised. I hope it is useful, if not feel free to close.

rgds
Ben

* Update docs/content/packages/ruby.mdx

fix: links to make them more impactful as per the (Primer Accessibility Style Guide)[https://primer.style/design/accessibility/guidelines#links].

Co-authored-by: Ash Guillaume <[email protected]>

* Create ten-toes-doubt.md

Co-authored-by: Ash Guillaume <[email protected]>
Co-authored-by: Jon Rohan <[email protected]>
Co-authored-by: Jon Rohan <[email protected]>
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.

3 participants