BalticAmadeus / ProBro

VSCode extension for Progress OpenEdge Database browsing
https://marketplace.visualstudio.com/items?itemName=BalticAmadeus.pro-bro&ssr=false#overview
Apache License 2.0
5 stars 2 forks source link

Record locking (Shared, Exclusive) #489

Open PauliusKu opened 9 months ago

PauliusKu commented 9 months ago

I, as a user, want to lock selected record(s) to be able to debug my code.

User flow.

  1. User opens Query grid window
  2. User selects one or more records
  3. User click on button Lock (Shared) or Lock (Exclusive)
  4. Records are locked for predefined amount of time. (We cannot lock indefinitely as it's a web app, and we could lose connection).
  5. User can see popup with information about lock status and countdown till the end of lock
abelzis commented 7 months ago

Additional info to the ticket:

  1. User doesn't select records. Locks will be implemented on record hover.
  2. The locking should be done for 5 minutes.

Design mocks:

  1. Locked records: An icon on the locked records should be displayed next to them. On hover, a popup should be displayed with additional info: type of lock and remaining lock time. image
  2. To lock a record: On record hover an icon appears on the left, next to a checkbox, should be 50% transparent. On hover, a popup apears to the right to select a lock. 2 buttons present to select a lock. The lock icon and colors are indicated. image

Icons to be used:

  1. On unlocked record hover (50% transparent, color: var(--vscode-editor-foreground)): LockOpen
  2. Record locked with shared-lock (color: amber[500]): LockOutlined
  3. Record locked with exclusive-lock (color: amber[500]): Lock

Amber[500] can be found here: https://mui.com/material-ui/customization/color/

abelzis commented 7 months ago

This ticket can be split to 2 parts:

  1. Display of locked records
  2. Locking mechanism