-
Notifications
You must be signed in to change notification settings - Fork 13.5k
feat(calendar): Add actionable empty state with Create Event CTA #39931
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,4 +1,4 @@ | ||||||||||||||||||||||||||||||
| import { Box, States, StatesIcon, StatesTitle, StatesSubtitle, ButtonGroup, Button, Throbber } from '@rocket.chat/fuselage'; | ||||||||||||||||||||||||||||||
| import { Box, States, StatesIcon, StatesTitle, StatesSubtitle, StatesAction, StatesActions, ButtonGroup, Button, Throbber } from '@rocket.chat/fuselage'; | ||||||||||||||||||||||||||||||
| import { useResizeObserver } from '@rocket.chat/fuselage-hooks'; | ||||||||||||||||||||||||||||||
| import { | ||||||||||||||||||||||||||||||
| VirtualizedScrollbars, | ||||||||||||||||||||||||||||||
|
|
@@ -65,7 +65,15 @@ const OutlookEventsList = ({ onClose, changeRoute }: OutlookEventsListProps): Re | |||||||||||||||||||||||||||||
| {!calendarListResult.isPending && total === 0 && ( | ||||||||||||||||||||||||||||||
| <States> | ||||||||||||||||||||||||||||||
| <StatesIcon name='calendar' /> | ||||||||||||||||||||||||||||||
| <StatesTitle>{t('No_history')}</StatesTitle> | ||||||||||||||||||||||||||||||
| <StatesTitle>{t('No_events_for_today')}</StatesTitle> | ||||||||||||||||||||||||||||||
| <StatesSubtitle>{t('Take_a_break_or_create_an_event_to_get_started')}</StatesSubtitle> | ||||||||||||||||||||||||||||||
| {outlookUrl && ( | ||||||||||||||||||||||||||||||
| <StatesActions> | ||||||||||||||||||||||||||||||
| <StatesAction icon='new-window' onClick={() => window.open(outlookUrl, '_blank')}> | ||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: New external-link CTA opens a Prompt for AI agents
Suggested change
|
||||||||||||||||||||||||||||||
| {t('Create_Event')} | ||||||||||||||||||||||||||||||
| </StatesAction> | ||||||||||||||||||||||||||||||
| </StatesActions> | ||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||
|
Comment on lines
+70
to
+76
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add Using 🔒 Proposed fix- <StatesAction icon='new-window' onClick={() => window.open(outlookUrl, '_blank')}>
+ <StatesAction icon='new-window' onClick={() => window.open(outlookUrl, '_blank', 'noopener,noreferrer')}>
{t('Create_Event')}
</StatesAction>Also apply to line 99: - <Button icon='new-window' onClick={() => window.open(outlookUrl, '_blank')}>
+ <Button icon='new-window' onClick={() => window.open(outlookUrl, '_blank', 'noopener,noreferrer')}>
{t('Open_Outlook')}
</Button>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||
| </States> | ||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||
| {calendarListResult.isSuccess && calendarListResult.data.length > 0 && ( | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 228
🏁 Script executed:
Repository: RocketChat/Rocket.Chat
Length of output: 800
Add missing translation keys to en.i18n.json.
The keys
No_events_for_today,Take_a_break_or_create_an_event_to_get_started, andCreate_Eventare used in the code but missing frompackages/i18n/src/locales/en.i18n.json. Add these keys with appropriate English values to the translation file.🤖 Prompt for AI Agents