Skip to content

Add iModel recents and favorites functionality - #183

Merged
arome merged 37 commits into
mainfrom
omar/imodel-recent
Nov 4, 2025
Merged

Add iModel recents and favorites functionality#183
arome merged 37 commits into
mainfrom
omar/imodel-recent

Conversation

@arome

@arome arome commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Use the new recent and favorites APIs to manage iModels.

Feature Preview
iModel Recents 2025-10-16 15 46 35
iModel Favorites 2025-10-16 15 47 27

@arome
arome requested a review from aruniverse as a code owner October 16, 2025 20:03
@arome
arome enabled auto-merge (squash) October 16, 2025 21:26
@aruniverse

Copy link
Copy Markdown
Member

I had no idea about these enhancements to the service @robertas-kerpys , we should demo this at demo day at some point

@aruniverse
aruniverse requested a review from Copilot October 22, 2025 21:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds iModel recents and favorites functionality by integrating new APIs for tracking recently used iModels and managing favorite iModels. Users can now mark iModels as favorites with a star icon and view their recent/favorite iModels through filtered views.

  • Implements useIModelFavorites hook to manage favorites state and API calls
  • Adds IModelFavoritesContext to provide favorites functionality throughout the component tree
  • Updates IModelGrid and IModelTile components to display and interact with favorites
  • Adds support for "recents" and "favorites" request types in the data fetching logic

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
IModelFavoritesContext.tsx New context provider for managing iModel favorites state
useIIModelFavorites.ts New custom hook implementing favorites API calls and state management
useIIModelFavorites.test.ts Unit tests for the favorites hook
IModelTile.tsx Adds star icon button for toggling favorites and recents tracking on click
useIModelTableConfig.tsx Adds favorites column to table view with star toggle button
useIModelSort.ts Adds skipSort parameter to preserve API-provided ordering for recents
useIModelData.ts Adds requestType parameter to support favorites/recents API endpoints
IModelGrid.tsx Wraps grid in favorites provider and adds recents tracking on thumbnail click
ITwinTile.tsx Adds conditional rendering for favorites button
ITwinGrid.tsx Updates empty state messages for recents/favorites views
ITwinTile.stories.tsx Adds missing displayName property to story
IModelTile.stories.tsx Enhances story with additional props and examples
omar-imodel-recent_2025-10-16-20-04.json Change log entry for the feature
Files not reviewed (1)
  • common/config/rush/pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/modules/imodel-browser/src/containers/iModelGrid/useIIModelFavorites.ts Outdated
arome and others added 2 commits October 22, 2025 17:12
…ModelTableConfig.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…IModelFavorites.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

@simihartstein simihartstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. Most of these are small or repeated comments.

Comment thread packages/modules/imodel-browser/src/containers/iModelGrid/IModelGrid.tsx Outdated
Comment thread packages/modules/imodel-browser/src/containers/iModelGrid/IModelGrid.tsx Outdated
Comment thread packages/modules/imodel-browser/src/containers/iModelGrid/IModelGrid.tsx Outdated
Comment thread packages/modules/imodel-browser/src/containers/iModelTiles/IModelTile.tsx Outdated
Comment thread packages/modules/imodel-browser/src/containers/iModelTiles/IModelTile.tsx Outdated
Comment thread packages/modules/imodel-browser/src/containers/iModelTiles/IModelTile.tsx Outdated
@simihartstein

Copy link
Copy Markdown
Contributor

I had no idea about these enhancements to the service @robertas-kerpys , we should demo this at demo day at some point

BIC and developer.bentley.com should also integrate these apis. or ideally the iTwin and iModel browser components in this package.

I'm not sure who best to ask or if Omar reached out already... @michelledillard has been helpful with the developer website in the past. Scott Devoe mentioned @bill-mcnamara could point us in the right direction for BIC.

Comment thread packages/modules/imodel-browser/src/containers/iModelGrid/useIModelFavorites.ts Outdated
Comment thread packages/modules/imodel-browser/src/utils/iModelApi.ts

@simihartstein simihartstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for making all the changes! Looks great!

Comment thread packages/modules/imodel-browser/src/containers/ITwinGrid/ITwinTile.tsx Outdated
Comment thread packages/modules/imodel-browser/src/types.ts
@arome
arome merged commit d8ea7ae into main Nov 4, 2025
5 checks passed
@arome
arome deleted the omar/imodel-recent branch November 4, 2025 17:18
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.

4 participants