Console tutorial date based badge#253505
Conversation
There was a problem hiding this comment.
Pull request overview
This PR replaces hardcoded "new" badges with a date-based system that automatically determines if a tutorial should display the "New" badge based on a 30-day timeframe from its publication date.
Changes:
- Replaced the manual
isNewboolean flag with apublishedAtDate field for tutorials - Implemented an
isNew()utility function that calculates if a tutorial is less than 30 days old - Updated tutorial sorting to use
orderByby publication date instead ofsortByby theisNewflag
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| console_tutorials_group.tsx | Replaced isNew boolean with publishedAt dates for each tutorial and updated sorting logic |
| utils.ts | Added isNew() function to determine badge visibility based on 30-day threshold |
| utils.test.ts | Added comprehensive test coverage for the isNew() function |
| jest.config.js | Added Jest configuration for the search_getting_started plugin |
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Module Count
Async chunks
History
|
|
Starting backport for target branches: 9.3 https://github.com/elastic/kibana/actions/runs/22150746053 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
## Summary - change description text of agent builder tutorial - use 30 day time frame to apply the "new" badge given a tutorial's publish date (this really only is useful for the serverless release cadence) <img width="500" height="763" alt="Screenshot 2026-02-17 at 11 51 35 AM" src="https://github.com/user-attachments/assets/ca76b803-6d73-47d3-ba82-954e62225fa9" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary - change description text of agent builder tutorial - use 30 day time frame to apply the "new" badge given a tutorial's publish date (this really only is useful for the serverless release cadence) <img width="500" height="763" alt="Screenshot 2026-02-17 at 11 51 35 AM" src="https://github.com/user-attachments/assets/ca76b803-6d73-47d3-ba82-954e62225fa9" /> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
1 similar comment
|
Friendly reminder: Looks like this PR hasn’t been backported yet. |
Summary