Commit graph

3 commits

Author SHA1 Message Date
M Fahru
fb6746a887 Add default pathname logic on history react file tree (#12505)
On history react, when the initial screen has been loaded, no default pathname is selected. This PR adds logic for selecting default pathname and getting the diff for that pathname.

Also, add some other small changes, the notable ones are:

- Refactor some type naming and file structure related to the history file tree
- Refactor file tree selectable hooks (merge selectable context provider into the main provider)
- prevent clicking on the same file tree item by checking the current pathname before invoking the handler function

GitOrigin-RevId: 73c36e9ed918ae3d92dd47108fbe8542a7571bdd
2023-04-12 08:04:58 +00:00
M Fahru
17a98d756e Add badges UI to history react file tree (#12479)
GitOrigin-RevId: 52c45b72110e01bb193139654fa9385cb9b9e489
2023-04-05 08:03:05 +00:00
M Fahru
9a55bbf325 Port editor react file tree to history file tree (#12453)
This new history file tree is mostly copied from the editor file tree, with some of the features stripped away:

1. Remove multiple selections
2. Remove drag and drop ability
3. Remove the ability to rename files & folders
4. No more right-click hijacking (context menu)
5. No more triple dots menu on a file tree item shown
6. No file references, since history doesn't have the data to differentiate between real files and linked file
7. etc (some other small changes that are not too important to be listed)

Other notable changes:

1. Simplify the selectable provider (the only context provider being copied from react file tree)
2. Convert to typescript

GitOrigin-RevId: 1017e545b2bd99775e01307a9b7eac2daf454014
2023-04-04 08:05:30 +00:00