Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Variables Tab Access and Bottom Panel Controls #4638

Merged
merged 4 commits into from
Nov 18, 2024
Merged

Conversation

abdul99ahad
Copy link
Contributor

@abdul99ahad abdul99ahad commented Oct 28, 2024

Closes #4516

Proposed Changes

Variables Application Menu

Variables_Tab

Variables Tab Keyboard shortcut

(For Mac OS): Press Command + Shift + V

Variable Tab keyboard shortcut

Variables Bottom Tab

Variable bottom tab

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Oct 28, 2024
@nikku nikku mentioned this pull request Oct 28, 2024
4 tasks
@abdul99ahad abdul99ahad force-pushed the variables-tab branch 6 times, most recently from 7e162c8 to b3a4f84 Compare October 28, 2024 14:35
@philippfromme
Copy link
Contributor

We should call this Toggle variables tab

image

I'd also add Toggle problems tab now that we have the other entry.

@abdul99ahad abdul99ahad force-pushed the variables-tab branch 2 times, most recently from a84e98c to a6fa31b Compare October 29, 2024 11:06
@barmac
Copy link
Collaborator

barmac commented Oct 30, 2024

I'd suggest that we decide on another key for the shortcut. Ctrl/Cmd+V is the traditional paste shortcut, and in some editors a combination of Cmd+Shift+(Option)+V triggers "paste and match formatting". Why don't we use a letter without strong OS link, e.g. U or M.

Screen.Recording.2024-10-30.at.17.26.31.mov

@nikku
Copy link
Member

nikku commented Oct 31, 2024

I'd suggest that we decide on another key for the shortcut. Ctrl/Cmd+V is the traditional paste shortcut, and in some editors a combination of Cmd+Shift+(Option)+V triggers "past and match formatting".

I subscribe to this. CC @lmbateman.

@nikku nikku requested a review from lmbateman October 31, 2024 10:00
@nikku nikku changed the title Variables tab Improve variables tab integration Oct 31, 2024
@lmbateman
Copy link

I agree that we should stay away from Cmd-V variations. Looks like for many MacOS apps (but not the Desktop Modeler), Cmd-M minimizes the window. Cmd-U is a common shortcut for underline, but since that's a fairly specialized feature, I think Cmd-U will work, and Ctrl-U should be fine for Windows. (Should we add a Cmd-M shortcut?)

@barmac
Copy link
Collaborator

barmac commented Oct 31, 2024

BTW the recording I shared displays the vscode shortcuts. I think the Shift usage in that tool is wise as it allows to avoid conflicts. Learning from Cmd+P (print or toggle properties panel 🤡 ).

@philippfromme
Copy link
Contributor

MacOS tests are passing now. Will review.

@philippfromme
Copy link
Contributor

I'd imagine a toggle entry for the bottom panel (we could use Ctrl+B) and (optional) entries for the individual tabs.

image

@philippfromme
Copy link
Contributor

@abdul99ahad Could you adjust the PR according to my suggestion?

  • add Toggle bottom panel entry with Ctrl+B shortcut
  • remove Reset properties panel entry (was a workaround created at the time where we had issues with its size, no longer needed)
  • decide whether to add individual entries for each tab

@abdul99ahad
Copy link
Contributor Author

@abdul99ahad Could you adjust the PR according to my suggestion?

  • add Toggle bottom panel entry with Ctrl+B shortcut
  • remove Reset properties panel entry (was a workaround created at the time where we had issues with its size, no longer needed)
  • decide whether to add individual entries for each tab

Okay. Regarding point 3, I think for now, we can add variables tab as individual entry and see in future if users also want Output and Problems tab in application menu.

@nikku
Copy link
Member

nikku commented Nov 5, 2024

Regarding point 3, I think for now, we can add variables tab as individual entry and see in future if users also want Output and Problems tab in application menu.

I'd say: Don't add a toggle shortcut for variables panel for now, but in the future automatically open variables tab from various places. Much more important that this is properly wired, i.e. with the FEEL editors.

@philippfromme
Copy link
Contributor

Additionally, adding the individual entries including disabled states is a bit more work since opening a tab doesn't trigger a menu update at the moment. So I'd say let's keep it for later or just don't add them if no one ever asks.

@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed needs review Review pending labels Nov 15, 2024
@abdul99ahad
Copy link
Contributor Author

@abdul99ahad Regarding aa5d66d: The usual pattern is two empty lines separating two specs, separating specs and setup, separating two describes.

We don't add two empty lines between describe and child spec or describe, so this is the standard way of formatting you'll find across 99% of our tests:

describe('foo', function() {

  beforeEach(...);
  
  beforeEach(...);
  
  
  it('first test');
  

  it('second test');
  
  
  describe('nested describe', function() {
    
    describe('deeply nested describe', function() {
      
      it('nested it');
      
    });
    
  });
  
  
  describe('another nested describe', ...);
  
});

Understood. If that's the convention, then I think the test cases are perfectly aligned with the convention.

@abdul99ahad
Copy link
Contributor Author

Beyond a minor style comment (#4638 (comment)) this still seems to not work as expected:

  • What I'd expect is that in any view I'm able to toggle the bottom tabs open and close.
  • What I see is that this PR manually registers the action for a subset of our views, so it is not available in forms, welcome page, etc.

Agreed. I assumed it should function like the properties panel, but since the bottom panel is more global, it makes sense to make it universally available. I've implemented the necessary changes, and the bottom panel is now accessible throughout the modeler.

@abdul99ahad abdul99ahad requested a review from nikku November 18, 2024 09:46
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Nov 18, 2024
@nikku
Copy link
Member

nikku commented Nov 18, 2024

Ok, this works properly now, across all file types. One issue that remains is that we don't properly fall back to another "known tab" when we switch to a view where a particular tab is not present:

capture R4Me67_optimized

This issue, however, can already be reproduced in released versions of the modeler, so not a regression.

@nikku
Copy link
Member

nikku commented Nov 18, 2024

I think it is a good solution we ended up building here 👏

@nikku
Copy link
Member

nikku commented Nov 18, 2024

Please add an entry to the CHANGELOG, linking to the issue this closes.

@abdul99ahad abdul99ahad force-pushed the variables-tab branch 2 times, most recently from b6fd676 to cb7ee49 Compare November 18, 2024 11:50
@nikku
Copy link
Member

nikku commented Nov 18, 2024

Merging with some minor squashes.

@nikku nikku merged commit da36791 into develop Nov 18, 2024
9 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 18, 2024
@nikku nikku deleted the variables-tab branch November 18, 2024 12:02
@github-actions github-actions bot added this to the M83 milestone Nov 18, 2024
@philippfromme
Copy link
Contributor

Question: Did we agree to move the menu entry? I would expect it to be grouped with the Toggle properties panel entry.

image

@abdul99ahad
Copy link
Contributor Author

abdul99ahad commented Nov 22, 2024

Question: Did we agree to move the menu entry? I would expect it to be grouped with the Toggle properties panel entry.

image

Initially, it was grouped with Toggle properties panel but that group is mainly for subset of views (BPMN, DMN diagram etc,.). However, since the Bottom Panel is universally available across the entire application, its corresponding menu button needs to be accessible everywhere. Therefore, we’ve decided to place it alongside other universally applicable options in the application menu.

@philippfromme
Copy link
Contributor

Okay, understood. 😃

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.

Improve variables integration into Desktop Modeler
5 participants