Skip to content
This repository has been archived by the owner on Jun 12, 2024. It is now read-only.

Andrew/add faq type #634

Merged
merged 13 commits into from
Dec 5, 2023
Merged

Andrew/add faq type #634

merged 13 commits into from
Dec 5, 2023

Conversation

AndrewSepic
Copy link
Contributor

@AndrewSepic AndrewSepic commented Nov 29, 2023

This PR introduces a new content type for Mapbox docs. The 'FAQ' content type.

  • It adds a new Icon SVG and content Type to help-card-data.js
  • Changes the order of the content types to put troubleshooting last.
  • It also updates mbx-assembly-docs to unlock a new color for this new content type.

EDIT

  • This PR also instroduces hover state and styling for the card.js component.

@AndrewSepic AndrewSepic marked this pull request as ready for review November 29, 2023 17:55
@AndrewSepic AndrewSepic self-assigned this Dec 4, 2023
Copy link
Contributor

@chriswhong chriswhong left a comment

Choose a reason for hiding this comment

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

Just one question about remark-lint-mapbox. Looks good!

package.json Outdated
@@ -84,6 +84,7 @@
"@elastic/search-ui-site-search-connector": "1.7.0",
"@mapbox/mapbox-gl-supported": "^2.0.1",
"@mapbox/mr-ui": "^2.7.0",
"@mapbox/remark-lint-mapbox": "^4.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this need to be explicitly added here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I believe this was left over from my forced update to remark-lint-mapbox in order to have access to the new content type. This packages is already a dependency of remark-config-docs but rather than wait for dependabot to push an updated release (24 hrs?) I ran npm i @mapbox/remark-lint-mapbox@latest --force and I believe that's what added this. I was following the release instructions here.

I've removed this in the my most recent commit and remark-config-docs should have the most recent version (if the former release process is still working)

src/components/card/card.js Outdated Show resolved Hide resolved
@AndrewSepic
Copy link
Contributor Author

@chriswhong Updates on this last PR. The changes needed to make the RightArrow icon available for use within the pkg/components folder ofg dr-ui may not be the best long term solution. Now an icon has to be considered a fundamental part of dr-ui and have an example and be included in docs/src/categories.json. I think the best approach here may be to keep this SVG inline within the card.js or put in place a a new folder strcuture & build process for including icon components in dr-ui without all the overhead that it has now. I want to leave this as is for now, but have created a Jira ticket to keep track of this.

Lastly, I had issues trying to work around the react/jsx-no-bind eslint rule that does not want arrow functions used as component props. I am not as competent with class based components and struggled to write a non arrow function and have it bind to the component instance and work.

I'm happy to pair on that with you to help me understand, or keep the src/components/card/card.js as is, using //eslint-ignore

Copy link
Contributor

@chriswhong chriswhong left a comment

Choose a reason for hiding this comment

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

LGTM, added a commit to avoid the arrow function/eslint ignore issue in card.js

@AndrewSepic AndrewSepic merged commit 5fab02f into main Dec 5, 2023
2 checks passed
@AndrewSepic AndrewSepic deleted the andrew/add-faq-type branch December 5, 2023 17:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants