feat(rss-feed): add configurable description max length (#7051)

Co-authored-by: ajnart <thomas@ajnart.dev>
This commit is contained in:
Ben Zikriandajnart authored and GitHub committed 2026-10-07 17:42:59 +02:00
1 parent a7fac57d62
commit 68238fa69b
6 files changed
+21 -1

No files matched your search

@@ -47,6 +47,8 @@ export default function RssFeed({ options, width, height, displayMode }: WidgetC
const feed = useLiveFeed({
urls: options.feedUrls,
maximumAmountPosts: typeof options.maximumAmountPosts === "number" ? options.maximumAmountPosts : 100,
descriptionMaxLength:
typeof options.descriptionMaxLength === "number" ? options.descriptionMaxLength : 250,
});
const board = useRequiredBoard();
+5
View File
@@ -18,6 +18,7 @@ export const { definition, componentLoader } = createWidgetDefinition("rssFeed",
widgetQueryInputMatches(input, {
urls: scope.options.feedUrls,
maximumAmountPosts: scope.options.maximumAmountPosts,
descriptionMaxLength: scope.options.descriptionMaxLength,
}),
refetchInterval: null,
errors: {
@@ -39,6 +40,10 @@ export const { definition, componentLoader } = createWidgetDefinition("rssFeed",
defaultValue: 5,
validate: z.number().min(1).max(50),
}),
descriptionMaxLength: factory.number({
defaultValue: 250,
validate: z.number().int().min(1).max(5000),
}),
maximumAmountPosts: factory.number({
defaultValue: 100,
validate: z.number().min(1).max(9999),