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

Core interface improvement #860

Closed
fcoveram opened this issue Mar 7, 2023 · 9 comments
Closed

Core interface improvement #860

fcoveram opened this issue Mar 7, 2023 · 9 comments
Assignees
Labels
🖼️ aspect: design Concerns related to design design: ready Issue with a mockup ready for implementation ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects

Comments

@fcoveram
Copy link
Contributor

fcoveram commented Mar 7, 2023

Problem

During the last couple of months, the current interface has carried multiple size and style inconsistencies among components that impact all areas of Openverse. This largely began with the redesign process where base elements were not fully defined and passed through various exploratory iterations, especially before the header redesign when I tested many ideas for the search result and single result layouts.

The design of these elements did not tap into the Tailwind composite approach, and styles were applied per Figma component instead of picking primitive utility values. This situation, at a large scale, created several space and size disparities in the interface that make Openverse looks broken. VButton is the best example of this mistreatment as the current Design Library carries a big variety of buttons.

Current buttons

Because of the range shown above, two buttons with the same padding but different label styles break down the horizontal grid and create an odd off-grid effect.

Inconsistent size

This problem can be pointed out in certain areas of the interface, but since this design and dev method is basal, it can increase and become unbearable in the long term.

Project and issues related

Project: #415

Issues:

Proposal description

The problem described above is also caused by text style inconsistencies, but for the spacing aspect of this issue, I propose making two changes.

Auto width and fixed height

The component dimension is one of the main problems with the existing approach, so for that reason, it is crucial to address the change in terms of size, padding, and margin in primary elements.

To reach a consistent layout, I propose setting a fixed value for height and auto value for width in elements made of the VButton component. This size change will make popover items, CTAs, and single buttons more clean and consistent in every place no matter if it has an icon or not.

Fixed height

As the diagram points out, the issue is also caused by a text style consistency. But it is safer to tackle that issue separately.

We already started doing this with the new header where all interface components are set with this spacing rule. All current design elements that form the header have this spacing approach applied, so there is no need to update anything in the main nav but in old parts of the interface.

Header guides

The components compatible with this update will consider min-widths values to ensure translations and not collapse with label lengths. i18n and a11y should not be compromised.

Specs and documentation

To set a solid point of reference, I also suggest replacing many of the Figma’s button components with a basic one that allows setting all the utility values we need. This new design component generates most VButton elements that nowadays live separately in the Design Library.

New components

Since Figma does not define interface elements by adding style utilities, I created three components for the Filled, Border, and Transparent variants that work for all the buttons shown above in the image. The component does not mirror its code version, but the control shift is what would allow us to create and insert interface elements consistently.

I still envision cases where we will need to create buttons for specific contexts, but with this new spacing and documentation method, the process should be easy and keep visual consistency.

Once updating the Design Library with this new component, we can start revisiting each implementation and clean up the unnecessary styles.

Mockups

Figma file: Core interface improvement

As this ticket suggests a Design Library update, there are no mockups for pages. However, I documented the design and dev change in the following order:

  1. Button specs: Size and spacing description of the VButton
  2. Figma components: Design components involved in this update that will replace many of the existing ones in the Design Library.
  3. Figma editor and outcomes: Main change in the Figma editor and examples of how design elements will look like.

Feedback

  • What do you think of this idea?
  • Am I missing a code aspect that is crucial for the implementation?
  • Do you have concerns that have not been addressed here?
@fcoveram fcoveram added 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work ✨ goal: improvement Improvement to an existing user-facing feature 🖼️ aspect: design Concerns related to design labels Mar 7, 2023
@openverse-bot
Copy link
Collaborator

Subscribe to Label Action

cc @WordPress/gutenberg-design, @WordPress/openverse

This issue or pull request has been labeled: "🖼️ aspect: design"

Thus the following users have been cc'd because of the following labels:

  • WordPress/gutenberg-design: 🖼️ aspect: design
  • WordPress/openverse: 🖼️ aspect: design

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

@openverse-bot openverse-bot added this to Backlog in Openverse Mar 7, 2023
@fcoveram fcoveram added the design: in discussion Issue has a design that needs feedback label Mar 7, 2023
@krysal krysal added 🟨 priority: medium Not blocking but should be addressed soon and removed 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work labels Mar 7, 2023
@jasmussen
Copy link

Generally feels like a pretty solid approach to me.

OV doesn't have to perfectly align with gutenberg in terms of componentry, but since the visuals are already close, and the projects themselves are related, it might still be worth considering. In this case specifically, Gutenberg will be zeroing in on two button sizes, 32px height, and 40px height: WordPress/gutenberg#46734. 40px will also be used for all inputs, where it's tall and graceful. 48 becomes quite tall for inputs.

@fcoveram
Copy link
Contributor Author

fcoveram commented Mar 8, 2023

Thanks for the context @jasmussen.

Openverse sets most actions in 32px and 40px elements. 48px has been reserved for the header actions and CTAs in single result views. Since the header is the main nav component, search bar and actions had to stand out and ensure safe target areas, especially in small viewports. So Gutenberg and Openverse are very tied in that vein ✨ .

@fcoveram
Copy link
Contributor Author

fcoveram commented Mar 24, 2023

Answering the points shared by @obulat here and here in this ticket to steer the design discussion.

I think we can review each button case by case in the implementation PR, if necessary.

Based on the audit document you shared, I can list the components that are part of this updated and the components exclude from it. Since this change addresses a design documentation change in the Design Library, it makes sense to document this audit in the design file and have quick access to the source-of-truth components in Figma.

These components inherit the VButton specs, but can override some properties.

Great. Then in some cases we will need to override properties. The link that you shared (this one) to see the storybook test you started shows me a 404 error message. I don't know why that's happening.

After doing this I realized that we don't have the "pressed" (and pressed-hovered) states in the Figma file.

This is tricky because not all buttons have an active state. For example, "Switcher" is transparent in resting and has a gray border in hover, but in its active state, it has bg-dark-charcoal as background in resting but bg-dark-charcoal-90 in hover. This screenshot might explain it better.

Do you think there's still value in having the "Primary" and "Secondary" buttons? I think having the matrix of variants, sizes and 'icon-start'/'icon-end' is easier to manage because you can clearly see what the button is. And with Primary, you have to remember what size and color it is. And I don't think it's used in more that 1-2 places, or is it?

I agree with you because of the same reason.


Thanks to the audit documentation I started in the design file, I detected a few style inconsistencies in the Figma components that were already fixed. Here is the new version of the Figma components

CleanShot 2023-03-24 at 10 15 14@2x

The Figma components and a craft version of audit are in "iteration 2" page. If you agree with moving the audit to Figma, I will polish and clean up the design file.

@obulat obulat added the 🧱 stack: frontend Related to the Nuxt frontend label Mar 27, 2023
@fcoveram
Copy link
Contributor Author

Iteration 2 (i2)

A new version is done in the design file.

The final Figma components were created in the Design Library and already published to be used. Besides, the following spec sections were created/updated.

  1. Button base: It documents the basic size and spacing values that work for all Buttons
  2. Button styles: It documents the style characteristics of Filled, Border, and Transparent variants.
  3. VButton audit: (as Button variants and Customized buttons sections) It lists the UI components that do and do not require a dev update. It also has UI components that will be updated in the future.

CleanShot 2023-03-27 at 15 22 58@2x


Let me know if you @obulat see any inconsistency, error, or lack of definition. Otherwise, I would appreciate your confirmation that the hands-off is correct.

@fcoveram fcoveram self-assigned this Mar 27, 2023
@fcoveram
Copy link
Contributor Author

I was reviewing the button update of #1049 and detected the following visual effect due to a design decision

Wide buttons

When I started testing paddings in buttons with left and right icon for all height variants, I faced two visual situations: wide and narrow buttons. The main cause of this is the 24px icon on the sides with a ghosty area rooted in the SVG viewport that adds extra pixels to the button component. The effect is subtle, but depending on the button context, the page can look great or uneven.

To correct this effect, we need to change some spacing values in Label, Icon left, and Icon right buttons to reduce the wide effect. Here are the tables in "Component specs" page updated with the new values.

CleanShot 2023-03-31 at 14 47 04@2x

The values in dark are the new ones we need to update, while the gray values are the already developed that don't need udate. This image is only for this comment's purpose and I will update the "Component specs" page once we agree about this change.

What do you think @obulat?


Leaving this comment in this ticket instead of #1049 as this one covers the design discussion.

@fcoveram fcoveram mentioned this issue Mar 31, 2023
7 tasks
obulat added a commit that referenced this issue Mar 31, 2023
In accordance with #860 (comment)
@obulat
Copy link
Contributor

obulat commented Mar 31, 2023

@panchovm, I like this idea! I think it makes all the buttons more standardized. I've adjusted the paddings in #1003, you can view the updated snapshots there.

@obulat obulat moved this from Backlog to In progress in Openverse Mar 31, 2023
obulat added a commit that referenced this issue Apr 4, 2023
In accordance with #860 (comment)
obulat added a commit that referenced this issue Apr 4, 2023
In accordance with #860 (comment)
obulat added a commit that referenced this issue Apr 4, 2023
* Add new VButton sizes and variants

* Add new Storybook tests

* Add border to transparent- buttons

* Update bordered and transparent buttons

* Update stories

* Update snapshots

* Remove pressed variants

* Add missing snapshots

* Fix transparent buttons

* Update paddings

In accordance with #860 (comment)

* Update snapshots

* Update frontend/src/components/VButton.vue

Co-authored-by: Zack Krida <zackkrida@pm.me>

---------

Co-authored-by: Zack Krida <zackkrida@pm.me>
obulat added a commit that referenced this issue Apr 5, 2023
* Fix issues in the workflow simplifications of #1054 (#1058)

* Retry `up` recipe in case port is occupied (#990)

* Fix typo in docs building on `main` (#1067)

* Restore Django Admin views (#1065)

* Update other references of media count to 700 million (#1098)

* Dispatch workflows instead of regular reuse to show deployment runs (#1034)

* Use label.yml to determine required labels (#1063)

Co-authored-by: Dhruv Bhanushali <hi@dhruvkb.dev>

* Add `GITHUB_TOKEN` to GitHub CLI step (#1103)

* Pass actor for staging deploys with the `-f` flag (#1104)

* Bump ipython from 8.11.0 to 8.12.0 in /api (#1113)

Bumps [ipython](https://github.com/ipython/ipython) from 8.11.0 to 8.12.0.
- [Release notes](https://github.com/ipython/ipython/releases)
- [Commits](ipython/ipython@8.11.0...8.12.0)

---
updated-dependencies:
- dependency-name: ipython
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Absorb `actionlint` into pre-commit (#1028)

Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>

* Bump orjson from 3.8.8 to 3.8.9 in /api (#1114)

Bumps [orjson](https://github.com/ijl/orjson) from 3.8.8 to 3.8.9.
- [Release notes](https://github.com/ijl/orjson/releases)
- [Changelog](https://github.com/ijl/orjson/blob/master/CHANGELOG.md)
- [Commits](ijl/orjson@3.8.8...3.8.9)

---
updated-dependencies:
- dependency-name: orjson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add Sentry to the ingestion server (#1106)

* Add a wait to filter button test to fix CI (#1124)

* Bump boto3 from 1.26.100 to 1.26.104 in /ingestion_server (#1110)

* Bump sentry-sdk from 1.17.0 to 1.18.0 in /api (#1112)

* Bump pillow from 9.4.0 to 9.5.0 in /api (#1115)

* Update redis Docker tag to v4.0.14 (#1109)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* 🔄 synced file(s) with WordPress/openverse-infrastructure (#1127)

Co-authored-by: openverse-bot <null>

* Update other references of media count to 700 million (#1100)

* Fix prod deployment workflow dispatch call (#1117)

* Add a Slack notification job to the CI + CD workflow (#1066)

* Fix types in VFilters and VContentReport (#1030)

* Move the svgs for radiomark and check to components

* Add files to tsconfig and fix types

* Mock report service in the unit test

* Type svg?inline as vue Component

* Better License code type checking

* Update frontend/src/components/VFilters/VFilterChecklist.vue

* Revert unnecessary changes

* Update frontend/src/components/VFilters/VFilterChecklist.vue

Co-authored-by: Zack Krida <zackkrida@pm.me>

* Rename `ownValue` to `value_`

---------

Co-authored-by: Zack Krida <zackkrida@pm.me>

* Convert VPill and VItemGroup stories to mdx (#1092)

* Convert VPill story to MDX
* Convert VItemGroup story to mdx
* Fixing argTypes issue and fixing the headers

* Update ci to use github.token (#1123)

* Add `SLACK_WEBHOOK_TYPE` env var to reporting job (#1131)

* Add consent decision-making process documentation (#887)

* Prepare VButton for updates (#1002)

* Rename button sizes and apply some styles only to 'old' buttons

* Rename the snapshot tests to v-button-old

* Fix VTab focus style

* Small fixes (large-old, border, group/button)

* Revert VTab focus changes

Moved to a different PR

* Revert "Revert VTab focus changes"

This reverts commit ec9312d.

* Use only focus-visible for consistency

* Bump boto3 from 1.26.99 to 1.26.105 in /api (#1133)

Bumps [boto3](https://github.com/boto/boto3) from 1.26.99 to 1.26.105.
- [Release notes](https://github.com/boto/boto3/releases)
- [Changelog](https://github.com/boto/boto3/blob/develop/CHANGELOG.rst)
- [Commits](boto/boto3@1.26.99...1.26.105)

---
updated-dependencies:
- dependency-name: boto3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add more docs for Plausible and auto-initialise custom event names (#1122)

* Add more docs for Plausible and auto-initialise custom event names

* Update existing docs

* Add caveat that it is not necessary to run Plausible if not working on custom events

* Fix ToC

* Add new buttons variants and sizes (#1003)

* Add new VButton sizes and variants

* Add new Storybook tests

* Add border to transparent- buttons

* Update bordered and transparent buttons

* Update stories

* Update snapshots

* Remove pressed variants

* Add missing snapshots

* Fix transparent buttons

* Update paddings

In accordance with #860 (comment)

* Update snapshots

* Update frontend/src/components/VButton.vue

Co-authored-by: Zack Krida <zackkrida@pm.me>

---------

Co-authored-by: Zack Krida <zackkrida@pm.me>

* Pass `GITHUB_TOKEN` to deploy docs (#1134)

* Add context manager and join()

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Dhruv Bhanushali <hi@dhruvkb.dev>
Co-authored-by: Krystle Salazar <krystle.salazar@automattic.com>
Co-authored-by: Madison Swain-Bowden <bowdenm@spu.edu>
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
Co-authored-by: Tomvth <50104959+Tomvth@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adarsh Rawat <adarshrawat141@gmail.com>
Co-authored-by: Dhruv Bhanushali <dhruv_b@live.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Openverse (Bot) <101814513+openverse-bot@users.noreply.github.com>
Co-authored-by: Zack Krida <zackkrida@pm.me>
Co-authored-by: Sepehr Rezaei <54465154+sepehrrezaei@users.noreply.github.com>
Co-authored-by: Sumit Kashyap <mr.sumitkrr@gmail.com>
@fcoveram
Copy link
Contributor Author

Leaving here a code reflection that impacts design and documentation and comes up to me after reviewing PR #1049

medium and small sizes have the same text style for the label, label bold. However, large variant has description bold style for the label. This decision was because large variant is mostly used as CTA in Single result views, today in a page and in the future in modals, and the only style change is shifting to full-width in smaller breakpoints, as shown in the following mockup.

CleanShot 2023-04-10 at 10 43 37@2x

But on the other hand, the "See results" action in the content settings drawer does not need this text style change. It lives next to another button component and having the same text style in the label reaches more consistency. I also envision similar cases in the future where the screen needs to highlight one action for the page's purpose where it's placed.

That being said, I think the best way to approach this situation is to have label bold style in the label of large variants by default and override the label style to be description bold when it's placed in the single result views. What do you think of this @obulat?

@obulat obulat added design: ready Issue with a mockup ready for implementation and removed design: in discussion Issue has a design that needs feedback labels Apr 26, 2023
@zackkrida
Copy link
Member

I believe the design work in the PR is fully implemented. Closing! Please re-open if I am wrong, @WordPress/openverse-frontend.

Openverse automation moved this from In progress to Done! May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🖼️ aspect: design Concerns related to design design: ready Issue with a mockup ready for implementation ✨ goal: improvement Improvement to an existing user-facing feature 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Openverse
  
Done!
Development

No branches or pull requests

6 participants