Display lock information on directory and blob pages
## Context By having a consistent title area for both directories and pages, we can start adding attributes/labels to identify the state of the file such as it being "locked". ## Proposal Display lock icon next to title | Proposed: Directory lock icon | Proposed: File lock icon | |-------------------------------|--------------------------| | ![update - repository - code.jpg](/uploads/1a311fc5ae1f0cd24c5f56b8059714b9/update_-_repository_-_code.jpg) | ![update - file.jpg](/uploads/dfb7866500b6c68e8a695becd6069f07/update_-_file.jpg) | Improve the consistency and ux of the lock/unlock confirmation modals. <table> <tr> <th>Proposed: Directory lock modal</th> <th>Proposed: File lock modal</th> </tr> <tr> <td> ![directory-lock.jpg](/uploads/914545e66fc9d63ea5ca234b8a235030/directory-lock.jpg) ![directory-unlock.jpg](/uploads/f8adb368079b47d1b65fcfd72f0babcd/directory-unlock.jpg) </td> <td> ![file-lock.jpg](/uploads/504dd53c6de49f88b2d191a6e25077fa/file-lock.jpg) ![file-unlock.jpg](/uploads/babab6c05deb93091467fa20251fc139/file-unlock.jpg) </td> </tr> </table> ## Current state Currently locked files/directories can be known by looking at the state of the button like "Unlock" <table> <tr> <th>Current: Directory lock button</th> <th>Current: File lock button</th> </tr> <tr> <td> ![directory-lock.png](/uploads/a232da9c2c35c5e6fe445fcba5b505f7/directory-lock.png){width="1232" height="828"} ![directory-unlock.png](/uploads/4518323b503eaab8378dd7f45a9f6c11/directory-unlock.png){width="1234" height="828"} </td> <td> ![file-lock.png](/uploads/541ffe5dd66654bf630a4fba77ca7d55/file-lock.png){width="1232" height="827"} ![file-unlock.png](/uploads/8125a53925562fb23a7bbea55621df90/file-unlock.png){width="1233" height="829"} </td> </tr> </table> <table> <tr> <th>Current: Directory lock modal</th> <th>Current: File lock modal</th> </tr> <tr> <td> ![Screenshot 2024-12-16 at 3.38.51 PM.png](/uploads/712665a6456cc32c74b44805e54d9d48/Screenshot_2024-12-16_at_3.38.51_PM.png){width="1231" height="827"} ![Screenshot 2024-12-16 at 3.39.06 PM.png](/uploads/6600b4154e71df0720dad77f1a334819/Screenshot_2024-12-16_at_3.39.06_PM.png){width="1230" height="829"} </td> <td> ![Screenshot 2024-12-16 at 3.43.06 PM.png](/uploads/e8362cf666298114ed65129078ea055a/Screenshot_2024-12-16_at_3.43.06_PM.png){width="1228" height="825"} ![Screenshot 2024-12-16 at 3.44.11 PM.png](/uploads/b61dd0971b41392cdbc7ed2877026684/Screenshot_2024-12-16_at_3.44.11_PM.png){width="1228" height="825"} </td> </tr> </table> ### User flow <table> <tr> <th>Step</th> <th>Screen</th> </tr> <tr> <td> User navigates to a single file/directory page that is currently **not locked** </td> <td> ![1-file.jpg](/uploads/555b9a79d4c013619c819ca018bd372e/1-file.jpg) </td> </tr> <tr> <td> User clicks into the `Overflow menu` \> `Lock file` to lock the file </td> <td> ![2-file-overflow.jpg](/uploads/05971bb3f0782625e766573aeaee0051/2-file-overflow.jpg) </td> </tr> <tr> <td> The file is now **locked**. The lock button denotes the state of the file as being "locked." </td> <td> ![3-lock.jpg](/uploads/a7297d21fd115ce2393d276193de8b11/3-lock.jpg) </td> </tr> <tr> <td> When a user clicks on the lock icon, they can view details on who locked the file. If a user has permission, they can unlock the file. `Unlock file` should still be available in the overflow menu as a redundancy for discoverability and accessibility. </td> <td> If a user has permission to unlock: ![4-lock - file popover with actions.jpg](/uploads/322e7244b9ec0f2245480c10743d7ac5/4-lock_-_file_popover_with_actions.jpg) If a user does not have permission to unlock: ![4-lock - button.jpg](/uploads/0a5c9ac064f1a806f6a37f868a130c97/4-lock_-_button.jpg) Overflow menu item changes to "Unlock file" if an item is locked, and if the user has permission to unlock the file: ![5-unlock-overflow.jpg](/uploads/40bc3447edae8d21f0bd0fc599943d23/5-unlock-overflow.jpg) </td> </tr> </table> ### Design file :art: [Figma - locked files](https://www.figma.com/file/eq2nf3B8MhB9xKrC0VzbPf/Repository?type=design&node-id=2445%3A221915&mode=design&t=2QM9DkbQpYYKb2JL-1)
epic