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

Release 🚀 #1877

Merged
merged 45 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b211557
chore: Update related resources json
LizBaker Nov 2, 2021
808389a
chore: Refactor related resources config functions
LizBaker Nov 2, 2021
d3c0247
chore: Create quickstart slug util
LizBaker Nov 2, 2021
ce314e4
chore: Add related resources component to details
LizBaker Nov 2, 2021
abc0e72
chore: Adjust css
LizBaker Nov 2, 2021
290afac
chore(OverviewTemplate): Replace class names with emotion
jerelmiller Nov 3, 2021
6a36486
chore(OverviewTemplate): Remove GuideListing wrapper
jerelmiller Nov 3, 2021
f394372
chore: Use secondary base for guide tiles
jerelmiller Nov 3, 2021
afad41d
chore: Tweak the guide tile style to match more of the docs look
jerelmiller Nov 3, 2021
c2bb6ff
chore: Add min label in guide tile itself
jerelmiller Nov 3, 2021
a493637
chore: Update duration to be an integer
jerelmiller Nov 3, 2021
310acb8
chore: Update GuideTemplate to add min label
jerelmiller Nov 3, 2021
cce156a
chore: Update FeaturedGuideTile to add min label
jerelmiller Nov 3, 2021
f19f369
chore: Update theme
LizBaker Nov 3, 2021
542758e
Merge branch 'develop' into liz/qs-related-resources
LizBaker Nov 3, 2021
9af563e
chore: updating one core sdk instructions
Nov 4, 2021
31c612e
chore: Add divider styling to right rail
LizBaker Nov 4, 2021
45504b8
Merge remote-tracking branch 'origin/develop' into jerel/update-tile-…
jerelmiller Nov 5, 2021
f858868
chore: Update new templates with duration
jerelmiller Nov 5, 2021
bd8afdd
chore: Fix issue with lab overview template
jerelmiller Nov 5, 2021
66f8aee
chore: Increase height on right rail
LizBaker Nov 5, 2021
ddb71a6
Merge branch 'develop' of github.com:newrelic/developer-website into …
LizBaker Nov 5, 2021
2b08f26
chore: updates sdk version
Nov 5, 2021
f4cec54
fix: added white background for quickstart icons
zstix Nov 5, 2021
3d4e3c4
chore(release): 1.68.2
nr-opensource-bot Nov 5, 2021
5341a0e
chore: removed unused style
zstix Nov 5, 2021
a248586
chore: adds a line
Nov 5, 2021
a6a15b5
chore: Rail style updates
LizBaker Nov 5, 2021
ed8d297
Merge pull request #1860 from newrelic/contribute-update
Nov 5, 2021
7b3266f
Merge pull request #1841 from newrelic/liz/qs-related-resources
Nov 5, 2021
d4abeb9
Merge pull request #1864 from newrelic/jerel/update-tile-design
Nov 6, 2021
259fe75
Merge pull request #1866 from newrelic/zstix/dark-mode-io-bg
Nov 8, 2021
124fab3
chore(release): 1.68.3
nr-opensource-bot Nov 8, 2021
c3f6631
chore: added script to dev site home
Nov 8, 2021
aa8c1c7
chore: added path for index page
Nov 9, 2021
f65974c
chore: fixed feather icons
Nov 9, 2021
fe1a5f7
Merge pull request #1876 from newrelic/feather-fixes
rudouglas Nov 9, 2021
b11b43a
chore: corrects location.pathname
Nov 9, 2021
e484024
Merge pull request #1875 from newrelic/crazy-egg
Nov 9, 2021
3baef51
chore: Grab related resources from main
LizBaker Nov 10, 2021
8221717
Merge pull request #1879 from newrelic/liz/related-resources-conflict
LizBaker Nov 10, 2021
15bcdc4
Revert "chore: Grab related resources from main"
LizBaker Nov 10, 2021
e21879c
Merge pull request #1882 from newrelic/revert-1879-liz/related-resour…
LizBaker Nov 10, 2021
c1640f2
chore: Add file from main
LizBaker Nov 10, 2021
ba678fe
Merge pull request #1883 from newrelic/liz/rr-fix
LizBaker Nov 10, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [1.68.3](https://github.com/newrelic/developer-website/compare/v1.68.2...v1.68.3) (2021-11-08)


### Bug Fixes

* added white background for quickstart icons ([f4cec54](https://github.com/newrelic/developer-website/commit/f4cec5476202346aeac42b40182ad1b7c02f1d7c))

## [1.68.2](https://github.com/newrelic/developer-website/compare/v1.68.1...v1.68.2) (2021-11-05)


### Bug Fixes

* fix for install button having signup as link too often ([d74c7fd](https://github.com/newrelic/developer-website/commit/d74c7fd69f850e79e8067e8323e454baba72fdbd))

## [1.68.1](https://github.com/newrelic/developer-website/compare/v1.68.0...v1.68.1) (2021-11-03)


Expand Down
2 changes: 1 addition & 1 deletion COMPONENT_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ It takes the title provided in the front matter and accepts plain text for the d
```
---
path: '/example'
duration: '30 min'
duration: 30
title: 'Example Guide'
template: 'GuideTemplate'
description: 'Example guide page'
Expand Down
19 changes: 16 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
- [Updating the SDK documentation bundle](#updating-the-sdk-documentation-bundle)
- [Step 1: Update the release number in `gatsby-config`](#step-1-update-the-release-number-in-gatsby-config)
- [Step 2: Add any new APIs or components to our constants list](#step-2-add-any-new-apis-or-components-to-our-constants-list)
- [How to identify new components, APIs](#how-to-identify-new-components-apis)
- [Adding new components](#adding-new-components)
- [Step 3: Add any new APIs or components to the navigation](#step-3-add-any-new-apis-or-components-to-the-navigation)

<!-- /TOC -->
Expand Down Expand Up @@ -401,16 +403,27 @@ need to happen:
- We use a [local Gatsby plugin `gatsby-source-newrelic-sdk`](https://github.com/newrelic/developer-website/tree/develop/plugins/gatsby-source-newrelic-sdk)
to source our documentation into GraphQL. This plugin has some configuration that tells it what release number to use.

- [Update `gatsby-config.js`](https://github.com/newrelic/developer-website/blob/ae42737f5f1cf556f3c44d864655c9a571739e28/gatsby-config.js#L161)
- [Update `gatsby-config.js`](https://github.com/newrelic/developer-website/blob/develop/gatsby-config.js#L198)
with the new release number to update the bundle release version.

- To obtain the version release number visit the `one-core` repository on Github enterprise and look at the release version in `sdk-loader.js`. You can use the one-core site to confirm if any issues are developer site specific or occurring in the SDK.
```json
{
resolve: 'gatsby-source-newrelic-sdk',
options: {
release: 'release-3250',
},
}
```

- To obtain the version release number visit the `one-core` repository on Github enterprise and look at the release version in `one-core/src/constants/sdk.js `. You can use the one-core docs site to confirm if any issues are developer site specific or occurring in the SDK.

### Step 2: Add any new APIs or components to our constants list

#### How to identify new components, APIs

At the moment, we don't have a rigorous or automatic process for identifying new components and APIs that we need to document. The goto manual process is to just eyeball the difference between the components we have on the site (or in constants.js), and what's displayed on the one-core site.
At the moment, we don't have a rigorous or automatic process for identifying new components and APIs that we need to document. The goto manual process is to just eyeball the difference between the components we have on the site (or in `constants.js`), and what's displayed on the one-core site.

You can also check a file that resides in the One Core repository found in `/src/__snapshots__/index.spec.js.snap` that provides a visual check for SDK components and their levels of exposure.

It is possible to see a list of components from the SDK itself. If you run the site with the updated SDK version, you can enter `Object.entries(window.__NR1_SDK__.default).map(array => array[0])` into the dev console in the browser for the running site. That will show you an array containing component and API names. You can use this to try and compare differences, but some manual investigation is still necessary, since the SDK also contains pre-release and internal-only components.

Expand Down
4 changes: 2 additions & 2 deletions STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ The value that is assigned to the key slug is used in order to navigate to your
### GuideTemplate Frontmatter slugs

- `path`: the relative path to the file
- `duration`: the estimated time to complete the exercise
- `duration`: the estimated time to complete the exercise in minutes
- `title`: the title of the page
- `template`: the Gatsby template used
- `description`: the description of the page
Expand All @@ -312,7 +312,7 @@ The value that is assigned to the key slug is used in order to navigate to your
```md
---
path: '/build-apps/add-time-picker-guide'
duration: '20 min'
duration: 20
title: 'Add the time picker to a sample application'
template: 'GuideTemplate'
description: 'Learn how to add a time picker to a sample application'
Expand Down
25 changes: 20 additions & 5 deletions gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const quote = (str) => `"${str}"`;
const resolveQuickstartSlug = require('./src/utils/resolveQuickstartSlug');

module.exports = {
flags: {
Expand Down Expand Up @@ -59,10 +60,23 @@ module.exports = {
refetch: Boolean(process.env.BUILD_RELATED_CONTENT),
engineKey: 'Ad9HfGjDw4GRkcmJjUut',
limit: 5,
getSlug: ({ node }) => node.frontmatter?.path,
getSlug: ({ node }) => {
if (node.internal.type === 'Mdx') {
return node.frontmatter.path;
} else if (node.internal.type === 'Quickstarts') {
return resolveQuickstartSlug(node.name, node.id);
}
},
getParams: ({ node }) => {
const { tags, title } = node.frontmatter;

let tags = [];
let title = '';
if (node.frontmatter) {
tags = node.frontmatter.tags;
title = node.frontmatter.title;
} else {
tags = node.keywords;
title = node.title;
}
return {
q: tags ? tags.map(quote).join(' OR ') : title,
search_fields: {
Expand All @@ -87,7 +101,8 @@ module.exports = {
};
},
filter: ({ node }) =>
node.frontmatter?.template === 'GuideTemplate',
node.frontmatter?.template === 'GuideTemplate' ||
node.internal.type === 'Quickstarts',
},
},
newrelic: {
Expand Down Expand Up @@ -196,7 +211,7 @@ module.exports = {
{
resolve: 'gatsby-source-newrelic-sdk',
options: {
release: 'release-3250',
release: 'release-3366',
},
},
'gatsby-plugin-embed-pages',
Expand Down
4 changes: 2 additions & 2 deletions gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require(`path`);
const { execSync } = require('child_process');
const { createFilePath } = require('gatsby-source-filesystem');
const slugify = require('./src/utils/slugify.js');
const resolveQuickstartSlug = require('./src/utils/resolveQuickstartSlug.js');

const kebabCase = (string) =>
string
Expand Down Expand Up @@ -208,7 +208,7 @@ exports.onCreateNode = ({ node, getNode, actions }) => {
createNodeField({
node,
name: 'slug',
value: `/instant-observability/${slugify(node.name)}/${node.id}`,
value: `${resolveQuickstartSlug(node.name, node.id)}`,
});
}
};
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "developer-website",
"private": true,
"version": "1.68.1",
"version": "1.68.3",
"dependencies": {
"@emotion/react": "^11.1.5",
"@emotion/styled": "^11.3.0",
Expand Down Expand Up @@ -123,4 +123,4 @@
"url": "https://github.com/newrelic/developer-website/issues"
},
"snyk": true
}
}
6 changes: 4 additions & 2 deletions src/components/DevSiteSeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ function DevSiteSeo({ description, meta, title, tags, location, type }) {
);

const crazyEgg = (location) => {
if (location.pathname === '/instant-observability/') {
if (
location.pathname === '/' ||
location.pathname === '/instant-observability/'
)
return (
<script
type="text/javascript"
src="//script.crazyegg.com/pages/scripts/0045/9836.js"
async="async"
/>
);
}
};

const metaDescription = description || site.siteMetadata.description;
Expand Down
3 changes: 1 addition & 2 deletions src/components/FeaturedGuideTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ const FeaturedGuideTile = ({
`}
name="fe-clock"
/>

{duration}
{duration} min
</div>
</div>
<h3
Expand Down
54 changes: 23 additions & 31 deletions src/components/GuideTile/GuideTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const GuideTile = ({ duration, title, description, className, to }) => (
as={Link}
to={to}
className={className}
base={Surface.BASE.PRIMARY}
base={Surface.BASE.SECONDARY}
interactive
css={css`
display: grid;
Expand All @@ -19,39 +19,14 @@ const GuideTile = ({ duration, title, description, className, to }) => (
transition: all 0.15s ease-out;
`}
>
<div
<h3
css={css`
display: grid;
grid-template-columns: 1fr auto;
grid-gap: 0.5rem;
align-items: baseline;
font-size: 1rem;
margin-bottom: 0.5rem;
`}
>
<h3>{title}</h3>
<div
css={css`
font-size: 0.75rem;
display: flex;
align-items: center;
text-align: right;
color: var(--accent-text-color);
padding: 0.3rem 0 0.2rem 1.2rem;
justify-self: end;
`}
>
{duration ? (
<Icon
css={css`
margin-right: 0.25rem;
`}
name="fe-clock"
/>
) : (
<span>&nbsp;</span>
)}
{duration}
</div>
</div>
{title}
</h3>
<p
css={css`
font-size: 0.875rem;
Expand All @@ -63,6 +38,23 @@ const GuideTile = ({ duration, title, description, className, to }) => (
>
{description}
</p>

{duration && (
<div
css={css`
font-size: 0.75rem;
display: inline-flex;
gap: 0.25rem;
align-items: center;
color: var(--accent-text-color);
border-radius: 0.25rem;
justify-self: start;
`}
>
<Icon name="fe-clock" />
{duration} min
</div>
)}
</Surface>
);

Expand Down
4 changes: 2 additions & 2 deletions src/components/PackTile.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ const PackTile = ({
object-fit: scale-down;
width: ${view === VIEWS.GRID ? 100 : 25}%;
padding: 0 ${view === VIEWS.GRID ? 5 : 1}%;
margin: 10px auto;
margin: 0 auto 10px;

.dark-mode & {
background-color: rgb(231 231 231 / 0);
background-color: white;
}

${view === VIEWS.LIST &&
Expand Down
4 changes: 2 additions & 2 deletions src/data/nav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
url: https://opensource.newrelic.com/nerdpacks/

- title: Contribute to quickstarts
icon: zap
icon: fe-zap
url: '/contribute-to-quickstarts'
pages:
- title: Build a quickstart
Expand Down Expand Up @@ -493,7 +493,7 @@
- title: All things open
url: '/all-things-open'
- title: Instant Observability
icon: box
icon: fe-box
url: '/instant-observability'
- title: Nerd Bytes
icon: nr-nerd-bytes
Expand Down
Loading