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

Add tabs to demo site and PresetPlugin #2511

Merged
merged 14 commits into from
Mar 19, 2024

Conversation

Andres-CT98
Copy link
Contributor

Description:

The demo site has only one ribbon which contains all buttons on it. This makes it hard to debug, as well as general demo site usage, when constantly using the buttons that exist only on the expanded ribbon. Here is an example of the full workflow of creating a 3x3 table and making its central cell red with thick borders:

Workflow-demo

Fix

Tabs

Created tabs that modify which buttons show up on the ribbon, as well as making some common use buttons permanently accessible outside the ribbon. The old ribbon is still the default one under the Main tab. Here is the previous workflow under the new system:

Workflow-newdemo

The buttons made accessible outside the ribbon are: Undo, Redo, Zoom, Dark mode toggle, Export model, and Pop out window.

Presets

To improve the workflow even more, a preset plugin was implemented so that common use cases, or uncommon ones useful for testing, can be accessed at the press of a button and persist on page reloads.

Presets-demo

Miscellaneous changes

  • Fix issue of Side pane persisting on reload
  • Created an Image section for the Format Sate Side pane when an image is selected.
  • Made the border of the Table section for the Format Sate Side pane reflect the current Table border format to apply.
  • Some table edit button icons (Align, Merge, and Split) were removed and made to only show their label. This was done for readability as well as those buttons having reused icons. All functions are still on the Table context menu.

Warnings and implications

  • Button placements on each tab are not finalised

Made during FHL Week

@Andres-CT98 Andres-CT98 marked this pull request as ready for review March 19, 2024 17:49
switch (event.eventType) {
case 'editorReady':
case 'contentChanged':
this.updatePresetPluginState();
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to update editor for ContentChanged event. Just do it for EditorReady should be ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It needs to do it to update the CSS of the selected Preset button.

@Andres-CT98 Andres-CT98 merged commit ca960e2 into master Mar 19, 2024
7 checks passed
@Andres-CT98 Andres-CT98 deleted the u/acampostams/demo-tabs-and-presets branch March 19, 2024 20:11
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.

2 participants