Skip to content

Conversation

@alistair3149
Copy link
Member

@alistair3149 alistair3149 commented May 14, 2025

Closes: #391, #388

Key changes:

  • Implement styles to SchemaEditor according to Figma spec
  • Refactor DialogFooter component into EditSummary to be more generic
  • Use EditSummary component for edit summary in SchemaEditor
  • Use CdxMenu for property list
  • Use CdxToggleSwitch for boolean values instead of CdxCheckbox
  • Drop unused Codex override styles from global.scss
Recording.2025-05-14.200126.mp4

@JeroenDeDauw
Copy link
Member

Nice!

Two ideas for improvment, not nececerily in this PR:

  • Scrollbar in the property list to avoid vertical scroll of the entire page
  • Select first property on initialization to avoid just seeing the property list

@malberts
Copy link
Collaborator

Looks great. I'm still reviewing, but my first thought is we should add a max-width on the outer container (or on inputs). The UI feels a bit weird when it is wide (e.g. at 1920x1080 where full screen is still common, bigger screens get worse). The toggle switch in particular bothers me. I know clicking the label toggles it, but the visual element is all the way on the far right. This is not a problem with a checkbox where it's right next to the label.

In Vector 2022 it looks good, but in Vector, Chameleon and Medik the width can be problematic.

For example, compare Special:Search (max-width on container) and Special:Preferences (max-width on inputs).

@@ -14,14 +14,14 @@
{{ $i18n( 'neowiki-edit-summary-help-text-subject' ).text() }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This shows the wrong help message on SchemaEditor:
Screenshot_20250515_194249

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'll follow up on this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor thoughts:

  • EditSummary does not sound like it's a component with actions.
  • It's being used on SubjectEditorDialog, SchemaEditorDialog and EditSchemaPage. Right now it's probably fine since they all mostly look and act the same, but if we end up passing in a bunch of cusomtizations, then maybe there is only a superficial similarity that should not really be extracted.

<template>
<div class="number-attributes">
<!-- cdx-field class is used for spacing -->
<div class="number-attributes cdx-field">
Copy link
Collaborator

Choose a reason for hiding this comment

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

If it's just a margin, can't we rather add a custom common class like attributes-editor? Or maybe even add it once in PropertyDefinitionEditor. It feels like a hack to repurpose a class meant for something else.

{{ $i18n( 'neowiki-schema-editor-new-property' ).text() }}
</template>
</CdxCard>
<CdxMenu
Copy link
Collaborator

Choose a reason for hiding this comment

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

Initially I did not use CdxMenu because my understanding was that it's supposed to be used in a specific way - as part of something that triggers a dropdown.
For example: :expanded="true" and the drop shadow point to the intention of it being a floating and hideable component.

I guess it's fine if it works. But I'm not sure at what point repurposing components in unintented ways might be a problem.

@malberts malberts merged commit a49d49a into master May 16, 2025
12 checks passed
@malberts malberts deleted the feat-391 branch May 16, 2025 20:26
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.

Style SchemaEditor

4 participants