Giter VIP home page Giter VIP logo

gatsby-theme-newrelic's Issues

[NR Browser] Instrument SimpleFeedback component

Summary

We need to instrument our SimpleFeedback component with NR Browser. We need to track the following events:

  • feedback_click: occurs when a user clicks on one of the feedback buttons

Properties that we want to record with this action:

  • feedback: whether the feedback is positive or negative

AC

  • instrumented with NR browser agent
  • update spreadsheet with action name, additional properties, location implemented, ect.

Create a common right rail component that can be used across sites

Description

The docs site will have a "right rail" component that will show a few page-specific items.

The component will look similar to the right rail that appears on the developer site, so we want to abstract it to the theme. This component will continue to utilize its modular architecture to allow for customization of what goes in the right rail. This will also allow site-specific modules that can be used in the right rail.

We also plan to abstract a couple of the common modules that we know are used on all the sites. This includes the contributing module and the last modified module.

NOTE: This is followup of newrelic/docs-website#191 that is specific to the theme work. The docs-site work will be done as a part of newrelic/docs-website#191..

Acceptance Criteria

  • Generalized right-rail component added to the Gatsby theme
  • GitHub buttons link to the correct locations
  • Ability to set contributing guide (default to CONTRIBUTING.md)

Screenshot(s)

Right Rail on Developer Site:
Screen Shot 2020-10-29 at 4 02 30 PM

Wireframes for Docs Site:
Screen Shot 2020-10-29 at 4 03 24 PM

Add the <HamburgerMenu /> component

To ensure consistency, let's add the hamburger menu so that it can be consumed by all New Relic Gatsby sites.

According to the component audit we will want to use aspects of the design from both the developer website and the open source site.

Design requirements:

  • Make the hamburger menu smaller than its current size
  • Keep the colors used on the open source site in both light and dark modes
  • Use rounded instead of square corners like the developer site

[Build] Build one Callout component to rule them all

Summary

Build one Callout component in the theme that takes prop to specify which callout style it should render.

Acceptance criteria

  • As a developer I can use a Callout component and specify the type in a prop (tip, important, caution, permissions, pricing)

[NR Browser] Instrument ExternalLink component

Summary

We need to instrument our ExternalLink and Link component with NR Browser. We need to track the following events:

  • externalLink_click: occurs when a user clicks on any external link

Properties that we want to record with this action:

  • href: link clicked

AC

  • instrumented with NR browser agent
  • update spreadsheet with action name, additional properties, location implemented, ect.

Add language toggle to global header

Summary

Add a language toggle that switches the language context by changing the base url (docs.newrelic/en ==> docs.newrelic.com/jp)

Mock Up

Screen Shot 2021-01-04 at 3 14 06 PM

AC

  • Add optional language toggle to the global header
  • Switches the url based on the language toggle
  • Languages will be represented by language name

[NR Browser] Instrument ContributingGuidelines component

Summary

We need to instrument our ContributingGuidelines component with NR Browser. We need to track the following events:

  • editThisPage_click: occurs when a user clicks on the "edit this page" button
  • createAnIssue_click: occurs when a user clicks on the "create an issue" button

Properties that we want to record with this action:

  • component: where this takes place, for this one it would be in page tools

AC

  • instrumented with NR browser agent
  • update spreadsheet with action name, additional properties, location implemented, ect.

Opening the search overlay does not autofocus the input

Description

Opening the search overlay by clicking the search icon in the header does not autofocus the input. It would be great to focus the input so that the user can just begin typing their search query without first needing to click on the input.

Steps to Reproduce

  1. Click the search icon in the header
  2. Notice the input is not focused

Expected Behaviour

The input is auto focused after opening the search overlay

[NR Browser] Instrument SwiftypeSearch component

Summary

We need to instrument our SwiftypeSearch component with NR Browser. We need to track the following events:

  • swiftypeSearch_input: occurs when a user searches

Properties that we want to record with this action:

  • search_terms: the text that they inputted when they searched
  • num_results: the number of results that came back from the search

AC

  • instrumented with NR browser agent

Consume variant, size, etc props as case insensitive

Description

When using the variant or similar props for components (such as Button) we expect the user to supply one of the exported types. That said, sometimes the content creators want to use a component and simply supply a string. In the case of the title prop for the <Callout> component, it expects a capitalized string (which is not initially obvious).

We should look through our components and ensure that the user can use an exported type or a string (regardless of casing).

GlobalHeader is cut off by overflow:hidden on narrow viewports

Description

In mobile or narrow viewports, the GlobalHeader nav is being cut off in the middle of a nav item.

IMG_2137

Screen shot from iPhone 8, Safari browser, iOS 13.6.1

Steps to Reproduce

  • Load https://developer.newrelic.com/ on a mobile device or in Chrome using the iPhone 6/7/8 device emulator on via dev tools
  • Note in the upper right hand corner the word Community is cut off and the remaining nav items are not accessible

Expected Behaviour

Good question! I suppose I'd expect this either:

  1. to have a horizontal scroll
  2. to have only 2–3 items selectable, which all fit as full text
  3. to have a hamburger-icon and a mobile nav

Since most of the pages using this header will already have their own site-specific hamburger nav, you can probably rule our number 3.

Your Environment

  • iPhone 8, Safari browser, iOS 13.6.1

Additional context

Add site version to global footer component

Summary

The site version was displayed in the old OSS site footer, and it was cool but offered no utility and when we tried to apply it to the docs site, it was confusing as it wasn't clear what it was actually communication. So we removed it when we standardize the footer for all sites.

Screen Shot 2020-10-22 at 2 17 58 PM

Desired Behaviour

To actually make this useful and warrant it to be present in the global footer it would need to

  1. indicate it's a site version not docs version, or new relic product version.
  2. dynamically link to the current release tag on github so a user could click on it, and see the release notes for that version tag. ex: https://github.com/newrelic/opensource-website/releases/tag/v1.9.2
  3. be present in the footer under the footer logo image, vs being on the right side of the footer.

Create a base component that will form the foundation for the cards on each site

Based on a recent component audit from @djsauble, there are some similarities between the tile components used on both sites. While the design of the content itself differs, there is an opportunity to extract a base component that provides a container for content like this to live. This component would house the box shadows, background color, border, and text color of the card.

Recommendation: Call this component <Surface /> as this is a surface that sits on top of a background (inspiration from Material design)

Add hover states for buttons

Description

We have buttons defined that can be used across New Relic Gatsby sites, but these buttons do not currently have hover states. We need to define hover states for buttons to better provide the experience that these buttons are interactive.

Sign Up button on Dev / OSS site(s) should be Start Now

The Sign Up buttons to create an account should be more explicit relating to what the user is doing on our DECO sites on the Docs site: "Sign Up" makes sense but on the Dev site and OSS Site the button should be "Start Now".

Acceptance Criteria

  1. on the Docs Site, the sign up button should be sign up
  2. on the Dev Site, the sign up button should be start now
  3. on the OSS Site, the sign up button should be start now
  4. All URLs should point to the correct signup form and use the proper UTM source tag identifying where the user came from

Screen Shot 2020-12-29 at 10 31 48 AM

[NR Browser] Instrument GlobalFooter component

Summary

We need to instrument our GlobalFooter component with NR Browser. We need to track the following events:

  • editThisPage_click: occurs when a user clicks on the "edit this page" button
  • createAnIssue_click: occurs when a user clicks on the "create an issue" button

Properties that we want to record with this action:

  • component: where this takes place, for this one it would be in global footer

AC

  • instrumented with NR browser agent
  • update spreadsheet with action name, additional properties, location implemented, ect.

use custom events to track stale issue data on Github

Add a custom event into dashboard so we can track stale issues, and how do we track data on stale issue, and time to resolution, etc. Before attempting to implement discuss with the OSS Team and DTK Team if they do this in anyway with Github actions or Git Hub Stats

Setup snyk

Like the developer site, let's setup snyk to validate our dependencies.

Transform gatsby components to render react-intl context

Summary

We need to set up gatsby-plugin-intl on our gatsby theme or provide a way to render context for the global header and footer, as well as a few other components used by our docs site.

AC

  • Gatsby theme allows for language context switching on our sites
  • Global header internationalized
  • Global footer internationalized
  • Code block internationalized
  • Feedback internationalized
  • Cookie Consent Dialog internationalized

simplify the create Issue workflow to not require the use of github templates

With the Docs Site we decided to take a streamline approach to have the submit feedback button pass values in the URL using constants, which prevents the need to use a github issue template. This is very streamlined for a user, and it be cool to do this for the developer site as well and be consistent in our approach to creating issues on both sites.

code
https://github.com/newrelic/docs-website/pull/412/files/9d9091d5dbcf34c6eee855b3f89d7a9b92a53406#diff-22bbe242b6fb50d3a94108b9bf5c8b3df5f928f4d29dea68bc3f7e61d32ee26bR26

considerations

  • is this a theme level change or done for each site? Given the The OSS site may need additional issue templates.
  • does this makes sense to do for both the Docs Site and Dev Site?
  • why does the OSS Site need so many templates linked from create an issue? can we just by pass that.

current issue templates

Docs:
https://github.com/newrelic/docs-website/issues/new/choose

Dev Site:

https://github.com/newrelic/developer-website/issues/new/choose

OSS Site

https://github.com/newrelic/opensource-website/issues/new/choose

Documentation for global color variables

Documentation for global color variables

Summary

As noticed in a PR to our developer website, we don't have the best documentation surrounding our global color variables. I wonder if we would be able to link to our color guide / style guide so contributors creating new components are able to reference them!

Generate 3rd party notices

Like the developer site, we need to generate 3rd party notices to ensure we are using permissively licensed libraries.

Add the ability to disable sitemaps

Description

To ensure a user cannot discover available pages on our private docs site, we need to ensure sitemaps are not created. Currently the theme is configured to always create a sitemap. We want this to be configurable.

I propose we add a new theme option that will allow us to disable this:

// gatsby-config.js
{
  resolve: '@newrelic/gatsby-theme-newrelic'
  options: {
    sitemap: false
    // ...
  }
}

Acceptance criteria

  • Add the option to disable sitemaps
  • Sitemaps should default to enabled

Add shared global styles

Both the developer site and the open source site should have similar global styles (box sizing, font size, etc). Let's add the shared global styles to this project.

Keep the dark mode / light mode setting across DECO site properties

We are using local storage to persist the value on each site. From my googling, it doesn’t look like you can share local storage between subdomains, for security reasons. We’d either have to use cookies (which I think allow you to share across subdomains), or we’d need to implement a common iframe that we can communicate with from each site.

By default, each site uses the user’s OS preference. Unless they’ve specifically switched it, they should have the same theme across the sites.

preferably we'd try and solve it via cookies/local storage so it serves everybody consistently.

[NR Browser] Instrument 404 page

Summary

We need to instrument our 404 page with NR Browser. We need to track the following events:

  • 404_redirect: occurs when the user is redirected to the 404 page

Properties that we want to record with this action:

  • path: path the user were trying to reach

AC

  • instrumented with NR browser agent
  • update spreadsheet with action name, additional properties, location implemented, ect.

SEO component

The SEO component is used both in the OS site and the Dev Site, and likely will be used in the Docs site. We should factor this out into the theme.

AC

  • Component that adds SEO meta tags for our sites
  • Component added to the docs, oss, and dev site

Add an explorer's hub topic for support

To comply with our open source standards via the open source checklist, let's add an explorer's hub topic and link it in the README.

we will first need to update the NPM Package with details https://github.com/newrelic/gatsby-theme-newrelic

And given we don't have any pre-determined guidance for an npm package.

Will post something similar to what we do with the Nerdpacks which is grab some helpful bits from the README and treat it as an initial "press release" in a sense.

  • Screenshot + Intro, what is it and why would you want to use it
  • How to use it, install/setup (i.e. npm install)
  • Link to the repo

Add typography styles

To ensure consistency, we want to add all typography styles to the theme. These include:

  • Font families (primary, secondary, code)
  • Links
  • Primary and secondary text
  • Headers

[NR Browser] Instrument CodeBlock component

Summary

We need to instrument our CodeBlock component with NR Browser. We need to track the following events:

  • copyCodeBlock_click: occurs when a user clicks on the "copy" button

Properties that we want to record with this action:

  • modified: whether the code was copied as is or was modified

AC

  • instrumented with NR browser agent
  • update spreadsheet with action name, additional properties, location implemented, ect.

[NR Browser] Instrument ResultView component

Summary

We need to instrument our ResultView component with NR Browser. We need to track the following events:

  • swiftypeSearchResult_click: occurs when a user clicks on a search result link

Properties that we want to record with this action:

  • href: link clicked
  • title: title of result clicked

AC

  • instrumented with NR browser agent
  • update spreadsheet with action name, additional properties, location implemented, ect.

Install and configure Lerna

When we merge PRs into main, we want to publish a new version of the package to NPM. Using Lerna, we can automate the creation of the changelog, update versions, and publish the package. Note that this will require a manual PR from develop to main.

Add the <SearchInput /> component

We have search inputs on both sites with similar treatment. Let's add this component so we can share both the implementation and the design.

According to the component audit, we want to use the design from the open source site, but with the added functionality of being able to clear the input with an x after typing, like on the developer website.

In addition to the designs, let's consider adding a size prop and allow the component to render as a large size which will match the size on the open source site

Add the global header

All New Relic Gatsby sites have the same global header. Let's add the global header to this project.

According to the component audit these are the design specs we should be following:

  • Use the icons + size of the icons from the open source site
  • On small screens, render the New Relic logo without the text, but keep the circles
  • On mobile, always show the dark mode icon, but place it next to the hamburger menu

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.