Skip to content

Commit

Permalink
Merge pull request #3377 from EclipseFdn/main
Browse files Browse the repository at this point in the history
Release v0.21.0
  • Loading branch information
amvanbaren authored Jan 30, 2025
2 parents b8a38f1 + c45b528 commit 4e32ce0
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 77 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG SERVER_VERSION=v0.19.1
ARG SERVER_VERSION=v0.21.0

# Builder image to compile the website
FROM ubuntu AS builder
Expand All @@ -19,7 +19,7 @@ RUN apt-get update \
&& corepack prepare yarn@stable --activate

# bump to update website
ENV WEBSITE_VERSION 0.13.0
ENV WEBSITE_VERSION 0.14.0
COPY . /workdir

RUN /usr/bin/yarn --cwd website \
Expand Down
5 changes: 1 addition & 4 deletions configuration/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ server:
spring:
application:
name: openvsx-server
autoconfigure:
# don't send traces to Zipkin
exclude: org.springframework.boot.actuate.autoconfigure.tracing.zipkin.ZipkinAutoConfiguration
config:
import: file:${DEPLOYMENT_CONFIG}
cache:
Expand Down Expand Up @@ -84,7 +81,7 @@ management:
exposure:
include:
- health
# - prometheus
- prometheus
tracing:
sampling:
probability: 0.1
Expand Down
36 changes: 36 additions & 0 deletions configuration/ehcache.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,40 @@
<disk unit="MB">8</disk>
</resources>
</cache>
<cache alias="files.webresource">
<expiry>
<tti unit="hours">1</tti>
</expiry>
<listeners>
<listener>
<class>org.eclipse.openvsx.cache.ExpiredFileListener</class>
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>
<event-ordering-mode>UNORDERED</event-ordering-mode>
<events-to-fire-on>EXPIRED</events-to-fire-on>
<events-to-fire-on>EVICTED</events-to-fire-on>
<events-to-fire-on>REMOVED</events-to-fire-on>
</listener>
</listeners>
<resources>
<heap>250</heap>
</resources>
</cache>
<cache alias="files.extension">
<expiry>
<tti unit="hours">1</tti>
</expiry>
<listeners>
<listener>
<class>org.eclipse.openvsx.cache.ExpiredFileListener</class>
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>
<event-ordering-mode>UNORDERED</event-ordering-mode>
<events-to-fire-on>EXPIRED</events-to-fire-on>
<events-to-fire-on>EVICTED</events-to-fire-on>
<events-to-fire-on>REMOVED</events-to-fire-on>
</listener>
</listeners>
<resources>
<heap>50</heap>
</resources>
</cache>
</config>
4 changes: 2 additions & 2 deletions website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"repository": "https://github.com/eclipse/open-vsx.org",
"license": "EPL-2.0",
"dependencies": {
"openvsx-webui": "0.13.0"
"openvsx-webui": "0.14.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0"
Expand All @@ -17,7 +17,7 @@
"@types/react-dom": "^18.2.6",
"@types/react-router-dom": "^5.3.3",
"css-loader": "^6.8.1",
"express": "^4.21.1",
"express": "^4.21.2",
"source-map-loader": "^4.0.1",
"style-loader": "^3.3.3",
"typescript": "~5.1.6",
Expand Down
94 changes: 43 additions & 51 deletions website/src/menu-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/

import React, { FunctionComponent, PropsWithChildren, useState, useRef } from 'react';
import { Theme, Typography, Menu, MenuItem, Link, Button, Accordion, AccordionDetails, AccordionSummary } from '@mui/material';
import React, { FunctionComponent, useState, useRef, useContext } from 'react';
import { Theme, Typography, Menu, MenuItem, Link, Button, Accordion, AccordionDetails, AccordionSummary, IconButton } from '@mui/material';
import { styled } from '@mui/material/styles';
import { Link as RouteLink } from 'react-router-dom';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
Expand All @@ -22,33 +22,41 @@ import PublishIcon from '@mui/icons-material/Publish';
import GroupWorkIcon from '@mui/icons-material/GroupWork';
import PeopleAltIcon from '@mui/icons-material/PeopleAlt';
import HubIcon from '@mui/icons-material/Hub';
import AccountBoxIcon from '@mui/icons-material/AccountBox';
import { UserSettingsRoutes } from 'openvsx-webui';
import { MainContext } from 'openvsx-webui/lib/context';
import { MobileMenuItem, itemIcon, MobileMenuItemText, MobileUserAvatar, headerItem, MenuLink, MenuRouteLink } from 'openvsx-webui/lib/default/menu-content'
import { UserAvatar } from 'openvsx-webui/lib/pages/user/avatar';

//-------------------- Mobile View --------------------//

const MobileMenuItem = styled(MenuItem)({
cursor: 'auto',
'&>a': {
textDecoration: 'none'
}
});

const itemIcon = {
mr: 1,
width: '16px',
height: '16px',
};

const MobileMenuItemText: FunctionComponent<PropsWithChildren> = ({ children }) => {
return (
<Typography variant='body2' sx={{ color: 'text.primary', display: 'flex', alignItems: 'center' }}>
{children}
</Typography>
);
};

export const MobileMenuContent: FunctionComponent = () => {
const {service, user} = useContext(MainContext)
return <>
{
user
? <MobileUserAvatar/>
: <MobileMenuItem>
<Link href={service.getLoginUrl()}>
<MobileMenuItemText>
<AccountBoxIcon sx={itemIcon} />
Log In
</MobileMenuItemText>
</Link>
</MobileMenuItem>
}
{
!location.pathname.startsWith(UserSettingsRoutes.ROOT)
? <MobileMenuItem>
<RouteLink to='/user-settings/extensions'>
<MobileMenuItemText>
<PublishIcon sx={itemIcon} />
Publish Extension
</MobileMenuItemText>
</RouteLink>
</MobileMenuItem>
: null
}
<MobileMenuItem>
<Link target='_blank' href='https://github.com/eclipse/openvsx'>
<MobileMenuItemText>
Expand Down Expand Up @@ -119,45 +127,17 @@ export const MobileMenuContent: FunctionComponent = () => {
</MobileMenuItemText>
</RouteLink>
</MobileMenuItem>
{
!location.pathname.startsWith(UserSettingsRoutes.ROOT)
? <MobileMenuItem>
<RouteLink to='/user-settings/extensions'>
<MobileMenuItemText>
<PublishIcon sx={itemIcon} />
Publish Extension
</MobileMenuItemText>
</RouteLink>
</MobileMenuItem>
: null
}
</>;
}


//-------------------- Default View --------------------//

const headerItem = ({ theme }: { theme: Theme }) => ({
margin: theme.spacing(2.5),
color: theme.palette.text.primary,
textDecoration: 'none',
fontSize: '1.1rem',
fontFamily: theme.typography.fontFamily,
fontWeight: theme.typography.fontWeightLight,
letterSpacing: 1,
'&:hover': {
color: theme.palette.secondary.main,
textDecoration: 'none'
}
});

const headerTypography = ({ theme }: { theme: Theme }) => ({
...headerItem({theme}),
cursor: 'pointer'
});

const MenuLink = styled(Link)(headerItem);
const MenuRouteLink = styled(RouteLink)(headerItem);
const MenuTypography = styled(Typography)(headerTypography);

const subMenuItem = ({ theme }: { theme: Theme }) => ({
Expand All @@ -176,6 +156,7 @@ const SubMenuLink = styled(Link)(subMenuLink);


export const DefaultMenuContent: FunctionComponent = () => {
const {service, user} = useContext(MainContext)
const [workingGroupMenuOpen, setWorkingGroupMenuOpen] = useState(false);
const workingGroupMenuEl = useRef<HTMLButtonElement | null>(null);
const toggleWorkingGroupMenu = () => setWorkingGroupMenuOpen(!workingGroupMenuOpen);
Expand Down Expand Up @@ -210,5 +191,16 @@ export const DefaultMenuContent: FunctionComponent = () => {
<Button variant='contained' color='secondary' href='/user-settings/extensions' sx={{ mx: 2.5 }}>
Publish
</Button>
{
user ?
<UserAvatar />
:
<IconButton
href={service.getLoginUrl()}
title='Log In'
aria-label='Log In' >
<AccountBoxIcon />
</IconButton>
}
</>;
}
36 changes: 18 additions & 18 deletions website/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1703,9 +1703,9 @@ __metadata:
languageName: node
linkType: hard

"express@npm:^4.21.1":
version: 4.21.1
resolution: "express@npm:4.21.1"
"express@npm:^4.21.2":
version: 4.21.2
resolution: "express@npm:4.21.2"
dependencies:
accepts: "npm:~1.3.8"
array-flatten: "npm:1.1.1"
Expand All @@ -1726,7 +1726,7 @@ __metadata:
methods: "npm:~1.1.2"
on-finished: "npm:2.4.1"
parseurl: "npm:~1.3.3"
path-to-regexp: "npm:0.1.10"
path-to-regexp: "npm:0.1.12"
proxy-addr: "npm:~2.0.7"
qs: "npm:6.13.0"
range-parser: "npm:~1.2.1"
Expand All @@ -1738,7 +1738,7 @@ __metadata:
type-is: "npm:~1.6.18"
utils-merge: "npm:1.0.1"
vary: "npm:~1.1.2"
checksum: 10/5d4a36dd03c1d1cce93172e9b185b5cd13a978d29ee03adc51cd278be7b4a514ae2b63e2fdaec0c00fdc95c6cfb396d9dd1da147917ffd337d6cd0778e08c9bc
checksum: 10/34571c442fc8c9f2c4b442d2faa10ea1175cf8559237fc6a278f5ce6254a8ffdbeb9a15d99f77c1a9f2926ab183e3b7ba560e3261f1ad4149799e3412ab66bd1
languageName: node
linkType: hard

Expand Down Expand Up @@ -2330,11 +2330,11 @@ __metadata:
linkType: hard

"nanoid@npm:^3.3.6":
version: 3.3.6
resolution: "nanoid@npm:3.3.6"
version: 3.3.8
resolution: "nanoid@npm:3.3.8"
bin:
nanoid: bin/nanoid.cjs
checksum: 10/67235c39d1bc05851383dadde5cf77ae1c90c2a1d189e845c7f20f646f0488d875ad5f5226bbba072a88cebbb085a3f784a6673117daf785bdf614a852550362
checksum: 10/2d1766606cf0d6f47b6f0fdab91761bb81609b2e3d367027aff45e6ee7006f660fb7e7781f4a34799fe6734f1268eeed2e37a5fdee809ade0c2d4eb11b0f9c40
languageName: node
linkType: hard

Expand Down Expand Up @@ -2398,8 +2398,8 @@ __metadata:
"@types/react-dom": "npm:^18.2.6"
"@types/react-router-dom": "npm:^5.3.3"
css-loader: "npm:^6.8.1"
express: "npm:^4.21.1"
openvsx-webui: "npm:0.13.0"
express: "npm:^4.21.2"
openvsx-webui: "npm:0.14.0"
source-map-loader: "npm:^4.0.1"
style-loader: "npm:^3.3.3"
typescript: "npm:~5.1.6"
Expand All @@ -2420,9 +2420,9 @@ __metadata:
languageName: node
linkType: hard

"openvsx-webui@npm:0.13.0":
version: 0.13.0
resolution: "openvsx-webui@npm:0.13.0"
"openvsx-webui@npm:0.14.0":
version: 0.14.0
resolution: "openvsx-webui@npm:0.14.0"
dependencies:
"@emotion/react": "npm:^11.11.1"
"@emotion/styled": "npm:^11.11.0"
Expand All @@ -2448,7 +2448,7 @@ __metadata:
react-router-dom: "npm:^6.14.1"
peerDependencies:
"@babel/core": ^7.0.0
checksum: 10/b0245fd107f2b88d86cf7fea5a9ded80ad9084a13fdff16904614f5bdeb9f750b916feb976748eee9da0e230065b0d9fc06f789f74153f21005d16eef57c1f07
checksum: 10/e2128612aebd8d42d2bb9399d4adce64c3efb812b60f53c57cefc625ce52e60c36bd7fdd9c1cb186f13f774bb6e0e6f7c0530cc428e9a364ad8e1c533e930abe
languageName: node
linkType: hard

Expand Down Expand Up @@ -2526,10 +2526,10 @@ __metadata:
languageName: node
linkType: hard

"path-to-regexp@npm:0.1.10":
version: 0.1.10
resolution: "path-to-regexp@npm:0.1.10"
checksum: 10/894e31f1b20e592732a87db61fff5b95c892a3fe430f9ab18455ebe69ee88ef86f8eb49912e261f9926fc53da9f93b46521523e33aefd9cb0a7b0d85d7096006
"path-to-regexp@npm:0.1.12":
version: 0.1.12
resolution: "path-to-regexp@npm:0.1.12"
checksum: 10/2e30f6a0144679c1f95c98e166b96e6acd1e72be9417830fefc8de7ac1992147eb9a4c7acaa59119fb1b3c34eec393b2129ef27e24b2054a3906fc4fb0d1398e
languageName: node
linkType: hard

Expand Down

0 comments on commit 4e32ce0

Please sign in to comment.