Skip to content

feat: add extension detail page for user-settings and admin dashboard#1939

Open
netomi wants to merge 3 commits into
mainfrom
overhaul-user-extension-view
Open

feat: add extension detail page for user-settings and admin dashboard#1939
netomi wants to merge 3 commits into
mainfrom
overhaul-user-extension-view

Conversation

@netomi

@netomi netomi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

This fixes #1500.

Previously there was no specific page to show details for an extension, both for the admin dashboard and the user settings. It was also not indicated if the version is actually active.

This PR overhauls that by adding a dedicated settings page for an extension that displays all versions of the extension in a table where you can delete individual versions.

Inactive versions for specific targets are formatted with strike-through atm, but this might change in the future.
Also when clicking on an extension on the namespace admin or scan admin page you will be navigated now the the settings page for this extension.

The code is extracted as a common component that is used from the admin dashboard and user settings where the delete action is parameterized to account for different endpoints.

Assisted-By: anthropic:claude-sonnet-4-6

…ns, add active field to indicate if a version for a target platform is active, remove obsolete delete routes as the delete is no on the detail page
@netomi

netomi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author
image image

@netomi netomi requested a review from gnugomez July 3, 2026 16:57
@netomi netomi marked this pull request as ready for review July 3, 2026 16:59

@gnugomez gnugomez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall it's looking really good, it provides a way more clear UI for users to manage their versions

Comment thread server/src/main/java/org/eclipse/openvsx/UserAPI.java Outdated
Comment on lines +43 to +49
useEffect(() => {
if (icon) {
URL.revokeObjectURL(icon);
}
service.getExtensionIcon(abortController.current, extension).then(setIcon);
setPage(0);
}, [extension]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: given the refactor I would take the opportunity and extract the extension icon thing to it's own component, this way we can re-use the fetching logic, it's so annoying.

import { ExtensionDetailRoutes } from '../../pages/extension-detail/extension-detail-routes';
import { createRoute } from '../../utils';

export const ExtensionDetailView: FunctionComponent<ExtensionDetailViewProps> = props => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: we need to add a way to go back to the list of all extensions

after your PR if a user goes into the extension detail view and wants to go back, there's no other way than changing the tab and then going back to extensions or to go out of the settings.

const deleteRoute =
(extension && createRoute([UserSettingsRoutes.EXTENSIONS, extension.namespace, extension.name, 'delete'])) ||
'';
const isAdminContext = pathname.startsWith(AdminDashboardRoutes.NAMESPACE_ADMIN);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: using pathname might not be the most resilient way of checking if it's in admin context.

a better option could be a react context

@gnugomez gnugomez Jul 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use a prop for the extension route, there's no need for the react context #1939 (comment)

Comment on lines +50 to +54
const route = extension
? isAdminContext
? createRoute([AdminDashboardRoutes.EXTENSION_ADMIN, extension.namespace, extension.name])
: createRoute([UserSettingsRoutes.EXTENSIONS, extension.namespace, extension.name])
: '';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I don't think this route decision belongs here, I would provide it as a prop

Comment on lines +36 to +53
const loadExtension = useCallback(async () => {
try {
setLoading(true);
const result = await service.getExtension(abortController.current, props.namespace, props.extension);
if (isError(result)) {
throw result;
}
setExtension(result);
} catch (err) {
if (err && (err as { status?: number }).status === 404) {
navigate(UserSettingsRoutes.EXTENSIONS);
} else {
handleError(err);
}
} finally {
setLoading(false);
}
}, [props.namespace, props.extension]);

@gnugomez gnugomez Jul 6, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (non-blocking): given that we decided to go with Tanstack query, it will be nice if all new data-fetching implementations use it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indicate status of extensions in the admin view

2 participants