Skip to content

Commit f54fc1f

Browse files
Merge pull request #260 from github/add-language
This pull request enhances the event management system by introducing support for event languages, updating UI components to display the new language field, and removing outdated documentation. Added a new "language" frontmatter property in several event markdown files Updated the event list and event detail components to render language information via the Chip component Updated documentation and issue templates to include the event language field
2 parents 0bdc237 + 13fbad5 commit f54fc1f

35 files changed

+12235
-308
lines changed

.github/ISSUE_TEMPLATE/add-to-calendar.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ body:
5757
validations:
5858
required: true
5959

60+
- id: language
61+
type: input
62+
attributes:
63+
label: Event Language
64+
description: "Primary language of the event (e.g., English, Spanish, Mandarin)"
65+
validations:
66+
required: true
67+
6068
- id: userName
6169
type: input
6270
attributes:

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ All fields included in the _frontmatter_ are mandatory:
5252
- `UTCStartTime`: start time in UTC, in `HH:MM` format.
5353
- `UTCStartTime`: end time in UTC, in `HH:MM` format.
5454
- `type`: one of the following `podcast`, `stream`, `talk`, `meetup`, `fundraising`, `conference`, `misc`.
55+
- `language`: primary language of the event (e.g., English, Spanish, Mandarin).
5556
- `userName`: user name or organization organizing the event.
5657
- `userLink`: link to user or organization profile.
5758
- `linkUrl`: Button link with external link to the event.

README-next.md

Lines changed: 0 additions & 34 deletions
This file was deleted.

README-old.md

Lines changed: 0 additions & 92 deletions
This file was deleted.
Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,43 @@
11
.button-link {
2+
background: rgba(255, 255, 255, 0.1);
3+
padding: spacing(1.5) spacing(3);
4+
border-radius: 100px;
25
display: inline-flex;
36
align-items: center;
4-
column-gap: 10px;
7+
column-gap: spacing(1);
8+
@extend %subtitle-1;
9+
text-decoration: none;
10+
color: $white;
11+
transition: all 0.2s ease;
512

6-
height: spacing(7);
7-
padding: 0 spacing(3);
8-
9-
@extend %body-1;
10-
11-
@extend %background-filter-white;
12-
border-radius: 131px;
13-
14-
transition: color $simple-fade, background $simple-fade;
13+
&:hover {
14+
background: $white;
15+
color: $purple;
16+
transform: translateY(-1px);
17+
}
1518

16-
.icon-arrow-right path {
17-
fill: $white;
19+
svg path {
20+
transition: fill 0.2s ease;
21+
}
1822

19-
transition: fill $simple-fade;
23+
&:hover svg path {
24+
fill: $purple;
2025
}
2126

22-
&:hover {
27+
// Special styling for the add event button
28+
&.events-list__add-button {
2329
background: $white;
2430
color: $purple;
31+
font-weight: 600;
2532

26-
.icon-arrow-right path {
33+
svg path {
2734
fill: $purple;
2835
}
36+
37+
&:hover {
38+
background: $white;
39+
transform: translateY(-2px);
40+
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
41+
}
2942
}
3043
}

components/chip/Chip.jsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@ const Chip = ({ label, icon, customColor }) => {
55
'custom-color': customColor,
66
})
77

8+
// Check for spoken language indicators
9+
const isSpokenLanguage = label.toLowerCase().startsWith('in ') ||
10+
['english', 'spanish', 'portuguese', 'mandarin', 'french', 'chinese']
11+
.some(lang => label.toLowerCase().includes(lang));
12+
813
return (
914
<div
1015
className={classes}
1116
data-location={label.toLowerCase().includes('virtual') ? true : undefined}
17+
data-spoken-language={isSpokenLanguage ? true : undefined}
1218
style={{ backgroundColor: customColor }}
1319
>
1420
{icon ? <span className="chip__icon">{icon}</span> : null}

components/chip/chip.scss

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
.chip {
22
padding: spacing(1) spacing(1.5);
3-
43
display: inline-flex;
54
align-items: center;
65
column-gap: 6px;
6+
flex-shrink: 0;
7+
white-space: nowrap;
78

89
background-color: $white;
910
@extend %subtitle-1;
@@ -17,9 +18,15 @@
1718
color: white;
1819
}
1920

21+
&[data-spoken-language] {
22+
background-color: #9C27B0; // Rich purple for language indicator
23+
color: white;
24+
}
25+
2026
&__icon {
2127
height: 18px;
2228
width: 18px;
29+
flex-shrink: 0;
2330

2431
svg {
2532
height: 100%;
Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
.datetime-chip {
22
@extend %subtitle-1;
3-
3+
display: flex;
4+
flex-direction: column;
5+
gap: spacing(1);
46

57
&__time {
6-
position: relative;
7-
display: flex;
8+
display: inline-flex;
89
align-items: center;
9-
10-
&:not(:last-child) {
11-
margin-bottom: spacing(1)
12-
}
13-
14-
@media (min-width: $md) {
15-
margin-bottom: spacing(1.5)
16-
}
10+
white-space: nowrap;
11+
color: $white-80;
1712
}
1813

1914
&__timezone {
2015
margin-left: spacing(1);
21-
2216
font-weight: $medium;
2317
font-size: 12px;
2418
line-height: 1.6;
25-
26-
color: $white-80;
19+
color: $white-50;
2720
}
2821

2922
&__icon {
3023
margin-right: spacing(1);
24+
display: flex;
25+
align-items: center;
26+
justify-content: center;
27+
opacity: 0.8;
3128
}
3229
}

components/event-detail/EventDetail.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const EventDetail = ({ event, reverseColumns, isFullPage }) => {
3333
<div className="event-detail__column">
3434
<Chip label={event.formattedDate.date} />
3535
<EventTypeChip type={event.type} />
36+
{event.language && <Chip label={event.language} />}
3637
{event.location && <Chip label={event.location} />}
3738
</div>
3839
<DateTimeChip

components/event-detail/event-detail.scss

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@
22
$self: &;
33

44
@extend %grid;
5-
65
position: relative;
6+
width: 100%;
7+
min-width: 0;
78

89
&__user {
910
margin-bottom: spacing(2);
1011
display: block;
11-
1212
font-family: $inter;
1313
font-weight: $regular;
1414
font-size: 1.25rem;
1515
line-height: 1.4;
16+
width: 100%;
17+
overflow: hidden;
18+
text-overflow: ellipsis;
1619

1720
&:hover {
1821
text-decoration: underline;
@@ -21,6 +24,9 @@
2124

2225
&__title {
2326
@extend %header-1;
27+
margin-bottom: spacing(3);
28+
width: 100%;
29+
min-width: 0;
2430

2531
&[href]::after {
2632
content: '';
@@ -42,17 +48,38 @@
4248
}
4349
}
4450

51+
&__chips {
52+
width: 100%;
53+
display: flex;
54+
align-items: center;
55+
margin-bottom: spacing(3);
56+
overflow-x: auto;
57+
padding-bottom: spacing(1);
58+
gap: spacing(2);
59+
-webkit-overflow-scrolling: touch;
60+
scrollbar-width: none;
61+
min-width: 0;
62+
63+
/* Hide scrollbar for IE, Edge and Firefox */
64+
-ms-overflow-style: none;
65+
66+
/* Hide scrollbar for Chrome, Safari and Opera */
67+
&::-webkit-scrollbar {
68+
display: none;
69+
}
70+
71+
> * {
72+
flex-shrink: 0;
73+
}
74+
}
75+
4576
&__info {
4677
display: flex;
4778
flex-direction: column;
4879
align-items: flex-start;
49-
justify-content: center;
50-
row-gap: spacing(4);
51-
5280
width: 100%;
53-
height: auto;
81+
min-width: 0;
5482
box-sizing: border-box;
55-
5683
grid-column: 1 / 5;
5784

5885
@media (min-width: $md) {

0 commit comments

Comments
 (0)