mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-05 18:34:09 +00:00
fix(ci): resolve remaining trip UI and contract checks
Match the date badge and spotlight behavior in tests, keep stored tag data out of plugin responses, and handle missing place review text. Lower the ratchets to the counts reported by CI after the simplifications.
This commit is contained in:
@@ -5173,7 +5173,7 @@ describe('the day route-tools row', () => {
|
||||
render(<DayPlanSidebar {...makeDefaultProps({ days: [day], assignments: {} })} />)
|
||||
const secondary = screen.getByText('Day 1')
|
||||
expect(secondary).toHaveClass('text-content-muted')
|
||||
expect(secondary.previousElementSibling?.className).toContain('font-bold')
|
||||
expect(secondary.previousElementSibling).toHaveClass('bg-surface-card')
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -557,7 +557,7 @@ export default function PlaceInspector({
|
||||
)
|
||||
}
|
||||
|
||||
function InspectorRating({ place, review, onRate }: { place: Place; review?: string; onRate?: PlaceInspectorProps['onRate'] }) {
|
||||
function InspectorRating({ place, review, onRate }: { place: Place; review?: string | null; onRate?: PlaceInspectorProps['onRate'] }) {
|
||||
const { t } = useTranslation()
|
||||
return (
|
||||
<DialogSection icon={Star} className={onRate ? undefined : 'hidden md:block'} label={t('places.details.fact.rating')}>
|
||||
|
||||
@@ -43,6 +43,26 @@ function availableTags(options: string[], selected: Set<string>, query: string,
|
||||
return options.filter((tag) => !selected.has(tripTagKey(tag)) && tripTagKey(tag).includes(query)).slice(0, 6);
|
||||
}
|
||||
|
||||
function ReadOnlyTripTags({
|
||||
tags,
|
||||
label,
|
||||
labelClass,
|
||||
className,
|
||||
}: {
|
||||
tags: string[];
|
||||
label: string;
|
||||
labelClass: string;
|
||||
className: string;
|
||||
}) {
|
||||
if (!tags.length) return null;
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className={labelClass}>{label}</div>
|
||||
<TripTagChips tags={tags} className="mt-1.5" />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function TripTagField({
|
||||
tags,
|
||||
draft,
|
||||
@@ -104,13 +124,7 @@ export function TripTagField({
|
||||
};
|
||||
|
||||
if (readOnly) {
|
||||
if (!tags.length) return null;
|
||||
return (
|
||||
<div className={className}>
|
||||
<div className={labelClass}>{t('mobileJourney.tags')}</div>
|
||||
<TripTagChips tags={tags} className="mt-1.5" />
|
||||
</div>
|
||||
);
|
||||
return <ReadOnlyTripTags tags={tags} label={t('mobileJourney.tags')} labelClass={labelClass} className={className} />;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user