Skip to content

Commit 90a7cae

Browse files
Merge branch 'master' into blog-images
2 parents b74f163 + 2989326 commit 90a7cae

File tree

14 files changed

+69
-41
lines changed

14 files changed

+69
-41
lines changed

gatsby-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ module.exports = {
360360
}
361361
}
362362
allMdx(
363-
sort: {frontmatter: {date: DESC}}
363+
sort: {fields: {dateForSort: DESC}}
364364
limit: 20
365365
filter: {
366366
frontmatter: { published: { eq: true } }

gatsby-node.js

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
261261
}
262262
}
263263
${
264-
isFullSiteBuild
264+
shouldBuildFullSite
265265
? `memberPosts: allMdx(
266266
filter: {
267267
fields: { collection: { eq: "members" } }
@@ -497,7 +497,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
497497
});
498498
});
499499

500-
if (isFullSiteBuild) {
500+
if (shouldBuildFullSite) {
501501
members.forEach((member) => {
502502
envCreatePage({
503503
path: member.fields.slug,
@@ -510,7 +510,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
510510
}
511511

512512
const MemberBio = res.data.memberBio?.nodes || [];
513-
if (isFullSiteBuild) {
513+
if (shouldBuildFullSite) {
514514
MemberBio.forEach((memberbio) => {
515515
envCreatePage({
516516
path: `${memberbio.fields.slug}/bio`,
@@ -542,7 +542,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
542542
});
543543
});
544544

545-
if (isFullSiteBuild) {
545+
if (shouldBuildFullSite) {
546546
integrations.forEach((integration) => {
547547
envCreatePage({
548548
path: `/cloud-native-management/meshery${integration.fields.slug}`,
@@ -575,7 +575,7 @@ exports.createPages = async ({ actions, graphql, reporter }) => {
575575
});
576576
});
577577

578-
if (!isFullSiteBuild) {
578+
if (!shouldBuildFullSite) {
579579
const litePlaceholderPages = [
580580
{
581581
collection: "members",
@@ -845,6 +845,24 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
845845
value: collection,
846846
});
847847

848+
// Normalize blog date to ISO string for stable sort order across build environments (fixes production blog order)
849+
if (collection === "blog") {
850+
let dateForSort = "1970-01-01T00:00:00.000Z";
851+
if (node.frontmatter?.date != null) {
852+
try {
853+
const parsed = new Date(node.frontmatter.date).toISOString();
854+
if (!Number.isNaN(Date.parse(parsed))) dateForSort = parsed;
855+
} catch {
856+
// keep fallback
857+
}
858+
}
859+
createNodeField({
860+
name: "dateForSort",
861+
node,
862+
value: dateForSort,
863+
});
864+
}
865+
848866
if (collection !== "content-learn") {
849867
let slug = "";
850868
if (node.frontmatter.permalink) {

src/components/Pricing/PricingAddons/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export const PricingAddons = ({ isYearly = false, setIsYearly, currency, enterpr
239239
label="Optionally, choose one or more add-ons"
240240
MenuProps={{
241241
disableScrollLock: true,
242-
disablePortal: true,
242+
marginThreshold: null,
243243
}}
244244
>
245245
{addOns.map((addon) => (

src/pages/blog/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const BlogList = loadable(() => import ("../../sections/Blog/Blog-list"));
99

1010
export const query = graphql`query allBlogs {
1111
allMdx(
12-
sort: {frontmatter: {date: DESC}}
12+
sort: {fields: {dateForSort: DESC}}
1313
filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}}
1414
) {
1515
nodes {
@@ -41,7 +41,8 @@ export const query = graphql`query allBlogs {
4141
}`;
4242

4343
const Blog = (props) => {
44-
if (props.data.allMdx.nodes.length === 0) {
44+
const nodes = props.data?.allMdx?.nodes ?? [];
45+
if (nodes.length === 0) {
4546
return (
4647
<LitePlaceholder
4748
pageContext={{
@@ -57,7 +58,7 @@ const Blog = (props) => {
5758
const [isListView, setIsListView] = useState(false);
5859
const [searchQuery, setSearchQuery] = useState("");
5960
const { queryResults, searchData } = useDataList(
60-
props.data.allMdx.nodes,
61+
nodes,
6162
setSearchQuery,
6263
searchQuery,
6364
["frontmatter", "title"],

src/sections/Blog/Blog-sidebar/blogSidebar.style.js

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,24 +48,11 @@ const BlogSideBarWrapper = styled.div`
4848
.scroll{
4949
max-height: 40rem;
5050
overflow: auto;
51-
padding-right: 10px;
52-
scrollbar-width: thin;
51+
scrollbar-width: none;
5352
54-
&::-webkit-scrollbar-thumb {
55-
background: #a9a9a9;
56-
border-radius: 1rem;
57-
}
58-
&::-webkit-scrollbar-track {
59-
background: #f0f0f0;
60-
border-radius: 1rem;
61-
}
62-
&::-webkit-scrollbar-button {
53+
&::-webkit-scrollbar{
6354
display: none;
6455
}
65-
&::-webkit-scrollbar {
66-
width: 6px;
67-
display: block;
68-
}
6956
}
7057
7158
&.catagorie{

src/sections/Blog/Blog-single/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const BlogSingle = ({ data, children }) => {
2727
const { relatedPosts: blogData, authors } = useStaticQuery(
2828
graphql`query relatedPosts {
2929
relatedPosts: allMdx(
30-
sort: {frontmatter: {date: DESC}}
30+
sort: {fields: {dateForSort: DESC}}
3131
filter: {fields: {collection: {eq: "blog"}}, frontmatter: {published: {eq: true}}}
3232
) {
3333
nodes {

src/sections/Community/Calendar/meetLinksData.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export const meet_links_data = [
44
meeting: "Layer5 Websites Meeting",
55
slack_channel: "#websites",
66
slack_link: "https://layer5io.slack.com/archives/C015QJKUMPU",
7-
meeting_minutes: "https://bit.ly/2XK4eQV",
7+
meeting_minutes: "https://meet.layer5.io/websites-minutes",
88
meeting_link: "https://meet.layer5.io/websites",
99
meeting_recordings: "https://www.youtube.com/playlist?list=PL3A-A6hPO2IO1ZuLj3cbOTdi-hlkF4Lqu",
1010
},

src/sections/Platform-Engineering/platform.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const Platform = () => {
2121
const data = useStaticQuery(
2222
graphql`query relatedBlogPosts {
2323
relatedPosts: allMdx(
24-
sort: { frontmatter: { date: DESC } }
24+
sort: { fields: { dateForSort: DESC } }
2525
filter: {
2626
fields: { collection: { eq: "blog" } }
2727
frontmatter: {

src/sections/Pricing/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ export const CurrencySelect = ({ currency, setCurrency }) => {
7777
setCurrency(e.target.value);
7878
}}
7979
label="Currency"
80+
MenuProps={{
81+
disableScrollLock: true,
82+
marginThreshold: null,
83+
}}
8084
renderValue={(value) => (
8185
<Box sx={{ display: "flex", alignItems: "center", gap: 1, color: "#fff" }}>
8286
<Typography variant="body1">{Currencies[value]?.symbol}</Typography>

src/sections/Projects/Sistent/components/select/code.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ const SelectCode = () => {
174174
<div className="showcase">
175175
<div className="items">
176176
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
177-
<Select defaultValue={10}>
177+
<Select defaultValue={10} MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
178178
<MenuItem value={10}>Ten</MenuItem>
179179
<MenuItem value={20}>Twenty</MenuItem>
180180
<MenuItem value={30}>Thirty</MenuItem>
@@ -190,7 +190,7 @@ const SelectCode = () => {
190190
<div className="showcase">
191191
<div className="items">
192192
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
193-
<Select defaultValue={10} variant="filled">
193+
<Select defaultValue={10} variant="filled" MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
194194
<MenuItem value={10}>Ten</MenuItem>
195195
<MenuItem value={20}>Twenty</MenuItem>
196196
<MenuItem value={30}>Thirty</MenuItem>
@@ -203,7 +203,7 @@ const SelectCode = () => {
203203
<div className="showcase">
204204
<div className="items">
205205
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
206-
<Select defaultValue={10} variant="standard">
206+
<Select defaultValue={10} variant="standard" MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
207207
<MenuItem value={10}>Ten</MenuItem>
208208
<MenuItem value={20}>Twenty</MenuItem>
209209
<MenuItem value={30}>Thirty</MenuItem>
@@ -231,7 +231,7 @@ const SelectCode = () => {
231231
<div className="showcase">
232232
<div className="items">
233233
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
234-
<Select defaultValue={10} autoWidth>
234+
<Select defaultValue={10} autoWidth MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
235235
<MenuItem value={10}>Ten</MenuItem>
236236
<MenuItem value={20}>Twenty</MenuItem>
237237
<MenuItem value={30}>Thirty</MenuItem>
@@ -247,7 +247,7 @@ const SelectCode = () => {
247247
<div className="showcase">
248248
<div className="items">
249249
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
250-
<Select defaultValue={10} size="small">
250+
<Select defaultValue={10} size="small" MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
251251
<MenuItem value={10}>Ten</MenuItem>
252252
<MenuItem value={20}>Twenty</MenuItem>
253253
<MenuItem value={30}>Thirty</MenuItem>
@@ -264,7 +264,7 @@ const SelectCode = () => {
264264
<div className="showcase">
265265
<div className="items">
266266
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
267-
<Select defaultValue={10} fullWidth>
267+
<Select defaultValue={10} fullWidth MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
268268
<MenuItem value={10}>Ten</MenuItem>
269269
<MenuItem value={20}>Twenty</MenuItem>
270270
<MenuItem value={30}>Thirty</MenuItem>
@@ -292,6 +292,7 @@ const SelectCode = () => {
292292
labelId="demo-select-label"
293293
id="demo-select"
294294
label="Age"
295+
MenuProps={{ disableScrollLock: true, marginThreshold: null }}
295296
>
296297
<MenuItem value={10}>Ten</MenuItem>
297298
<MenuItem value={20}>Twenty</MenuItem>
@@ -307,7 +308,7 @@ const SelectCode = () => {
307308
<div className="items">
308309
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
309310
<FormControl sx={{ width: "200px" }}>
310-
<Select defaultValue={10}>
311+
<Select defaultValue={10} MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
311312
<MenuItem value={10}>Ten</MenuItem>
312313
<MenuItem value={20}>Twenty</MenuItem>
313314
<MenuItem value={30}>Thirty</MenuItem>
@@ -338,6 +339,7 @@ const SelectCode = () => {
338339
}}
339340
value={selectedAge}
340341
displayEmpty
342+
MenuProps={{ disableScrollLock: true, marginThreshold: null }}
341343
>
342344
<MenuItem value={10}>Ten</MenuItem>
343345
<MenuItem value={20}>Twenty</MenuItem>
@@ -357,7 +359,7 @@ const SelectCode = () => {
357359
<div className="showcase">
358360
<div className="items">
359361
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
360-
<Select defaultValue={10}>
362+
<Select defaultValue={10} MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
361363
<ListSubheader muiSkipListHighlight>Group 1</ListSubheader>
362364
<MenuItem value={10}>Ten</MenuItem>
363365
<MenuItem value={20}>Twenty</MenuItem>
@@ -382,12 +384,12 @@ const SelectCode = () => {
382384
<div className="showcase">
383385
<div className="items">
384386
<SistentThemeProvider initialMode={isDark ? "dark" : "light"}>
385-
<Select disabled defaultValue={10}>
387+
<Select disabled defaultValue={10} MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
386388
<MenuItem value={10}>Ten</MenuItem>
387389
<MenuItem value={20}>Twenty</MenuItem>
388390
<MenuItem value={30}>Thirty</MenuItem>
389391
</Select>
390-
<Select error defaultValue={10}>
392+
<Select error defaultValue={10} MenuProps={{ disableScrollLock: true, marginThreshold: null }}>
391393
<MenuItem value={10}>Ten</MenuItem>
392394
<MenuItem value={20}>Twenty</MenuItem>
393395
<MenuItem value={30}>Thirty</MenuItem>
@@ -408,6 +410,7 @@ const SelectCode = () => {
408410
labelId="demo-select-label-outlined"
409411
id="demo-select-outlined"
410412
label="Age"
413+
MenuProps={{ disableScrollLock: true, marginThreshold: null }}
411414
>
412415
<MenuItem value={10}>Ten</MenuItem>
413416
<MenuItem value={20}>Twenty</MenuItem>
@@ -438,6 +441,7 @@ const SelectCode = () => {
438441
input={<OutlinedInput label="Name" />}
439442
value={multipleAges}
440443
onChange={handleMultiplSelect}
444+
MenuProps={{ disableScrollLock: true, marginThreshold: null }}
441445
>
442446
<MenuItem value={10}>Ten</MenuItem>
443447
<MenuItem value={20}>Twenty</MenuItem>

0 commit comments

Comments
 (0)