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

[Flexible Layouts] Flexible Layout styling fixes #7319

Merged
merged 39 commits into from
Jan 4, 2024

Conversation

khalidadil
Copy link
Contributor

@khalidadil khalidadil commented Dec 20, 2023

Closes #6693

Describe your changes:

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Is this change backwards compatible? For example, developers won't need to change how they are calling the API or how they've extended core plugins such as Tables or Plots.

Author Checklist

  • Changes address original issue?
  • Tests included and/or updated with changes?
  • Has this been smoke tested?
  • Have you associated this PR with a type: label? Note: this is not necessarily the same as the original issue.
  • Have you associated a milestone with this PR? Note: leave blank if unsure.
  • Is this a breaking change to be called out in the release notes?
  • Testing instructions included in associated issue OR is this a dependency/testcase change?

Reviewer Checklist

  • Changes appear to address issue?
  • Reviewer has tested changes by following the provided instructions?
  • Changes appear not to be breaking changes?
  • Appropriate automated tests included?
  • Code style and in-line documentation are appropriate?

@khalidadil khalidadil linked an issue Dec 20, 2023 that may be closed by this pull request
7 tasks
Copy link

deploysentinel bot commented Dec 20, 2023

Current Playwright Test Results Summary

✅ 15 Passing

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 01/04/2024 01:05:09am UTC)

Run Details

Running Workflow e2e-couchdb on Github Actions

Commit: 8cf081d

Started: 01/04/2024 01:02:35am UTC

View Detailed Build Results


Current Playwright Test Results Summary

✅ 172 Passing - ⚠️ 1 Flaky

Run may still be in progress, this comment will be updated as current testing workflow or job completes...

(Last updated on 01/04/2024 01:05:10am UTC)

Run Details

Running Job e2e-stable on CircleCI

Commit: 8cf081d

Started: 01/04/2024 12:59:37am UTC

⚠️ Flakes

📄   functional/plugins/telemetryTable/telemetryTable.e2e.spec.js • 1 Flake

Test Case Results

Test Case Last 7 days Failures Last 7 days Flakes
Telemetry Table unpauses and filters data when paused by button and user changes bounds
Retry 1Initial Attempt
1.75% (1) 1 / 57 run
failed over last 7 days
28.07% (16) 16 / 57 runs
flaked over last 7 days

View Detailed Build Results


Copy link

codecov bot commented Dec 20, 2023

Codecov Report

Attention: Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.

Project coverage is 55.61%. Comparing base (6f3bb5f) to head (8cf081d).
Report is 152 commits behind head on master.

Files Patch % Lines
.../plugins/inspectorViews/styles/FontStyleEditor.vue 25.00% 3 Missing ⚠️
...gins/inspectorDataVisualization/TelemetryFrame.vue 0.00% 2 Missing ⚠️
src/plugins/notebook/components/NotebookEmbed.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7319      +/-   ##
==========================================
- Coverage   55.70%   55.61%   -0.09%     
==========================================
  Files         656      657       +1     
  Lines       26192    26239      +47     
  Branches     2546     2549       +3     
==========================================
+ Hits        14589    14594       +5     
- Misses      10898    10934      +36     
- Partials      705      711       +6     
Flag Coverage Δ
e2e-full 41.09% <ø> (+0.04%) ⬆️
e2e-stable 58.78% <100.00%> (+0.66%) ⬆️
unit 48.64% <68.42%> (-0.14%) ⬇️
Files Coverage Δ
src/api/menu/components/MenuComponent.vue 50.00% <ø> (ø)
src/api/menu/components/SuperMenu.vue 66.66% <100.00%> (-8.34%) ⬇️
...s/flexibleLayout/components/ContainerComponent.vue 10.86% <100.00%> (ø)
...ugins/flexibleLayout/components/FlexibleLayout.vue 8.00% <ø> (ø)
...spectorViews/styles/StylesInspectorViewProvider.js 100.00% <100.00%> (+20.00%) ⬆️
src/plugins/plot/stackedPlot/StackedPlot.vue 59.80% <100.00%> (ø)
src/ui/components/ObjectView.vue 38.46% <100.00%> (-10.57%) ⬇️
src/ui/layout/BrowseBar.vue 45.83% <100.00%> (-1.48%) ⬇️
src/ui/preview/PreviewHeader.vue 45.71% <ø> (ø)
src/ui/toolbar/ToolbarContainer.vue 0.00% <ø> (ø)
... and 5 more

... and 11 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f3bb5f...8cf081d. Read the comment docs.

@khalidadil khalidadil changed the title Bugfix/issue 6693 [Flexible Layouts] Flexible Layout styling fixes Dec 20, 2023
@khalidadil khalidadil requested a review from ozyx December 20, 2023 17:28
@khalidadil khalidadil added this to the Target:3.2.1 milestone Dec 20, 2023
/**
* This test is dedicated to test styling of various plugins
*/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I created this file as a general one that could be used for all "styling" related tests. Should I instead make this plugin specific (flexible layouts in this case)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

no this is great

@@ -29,7 +29,7 @@
</div>

<div
class="c-fl__container-holder"
class="c-fl__container-holder u-style-receiver js-style-receiver"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added to fix styles not being applied properly


if (layoutItem) {
return true;
}

if (!domainObject) {
if (!domainObject || isFlexibleLayoutContainer) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added to disable the styles tab on flexible layout containers

@@ -23,7 +23,7 @@
<template>
<div
v-if="loaded"
class="c-plot c-plot--stacked holder holder-plot has-control-bar"
class="c-plot c-plot--stacked holder holder-plot has-control-bar u-style-receiver js-style-receiver"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added to fix the styles landing on the plot instead of the container. This created an issue where removing styles wasn't working properly since the add and remove targeted different elements.

@khalidadil khalidadil removed this from the Target:3.2.1 milestone Dec 20, 2023
# vue-eslint update 2019
14a0f84c1bcd56886d7c9e4e6afa8f7d292734e5
# eslint changes 2022
d80b6923541704ab925abf0047cbbc58735c27e2
Copy link
Collaborator

Choose a reason for hiding this comment

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

drive-by to make it easier to work with flex layouts

Copy link
Contributor

Choose a reason for hiding this comment

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

this is so cool

ozyx
ozyx previously requested changes Jan 3, 2024
Copy link
Contributor

@ozyx ozyx left a comment

Choose a reason for hiding this comment

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

Looks great! We should merge in the changes from master and update our imports/exports to be ESM syntax. Other than that, LGTM!

e2e/helper/stylingUtils.js Outdated Show resolved Hide resolved
e2e/helper/stylingUtils.js Outdated Show resolved Hide resolved
Comment on lines +38 to +55
/**
* Sets the background and text color of a given element.
*
* @param {import('@playwright/test').Page} page - The Playwright page object.
* @param {string} borderColorHex - The hex value of the border color to set, or 'No Style'.
* @param {string} backgroundColorHex - The hex value of the background color to set, or 'No Style'.
* @param {string} textColorHex - The hex value of the text color to set, or 'No Style'.
* @param {import('@playwright/test').Locator} locator - The Playwright locator for the element whose style is to be set.
*/
async function setStyles(page, borderColorHex, backgroundColorHex, textColorHex, locator) {
await locator.click(); // Assuming the locator is clickable and opens the style setting UI
await page.getByLabel('Set border color').click();
await page.getByLabel(borderColorHex).click();
await page.getByLabel('Set background color').click();
await page.getByLabel(backgroundColorHex).click();
await page.getByLabel('Set text color').click();
await page.getByLabel(textColorHex).click();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

this rocks

e2e/helper/stylingUtils.js Outdated Show resolved Hide resolved
@unlikelyzero unlikelyzero enabled auto-merge (squash) January 4, 2024 00:59
@unlikelyzero unlikelyzero added the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 4, 2024
@github-actions github-actions bot removed the pr:e2e:couchdb npm run test:e2e:couchdb label Jan 4, 2024
@unlikelyzero unlikelyzero merged commit 70de736 into master Jan 4, 2024
18 of 19 checks passed
@unlikelyzero unlikelyzero deleted the bugfix/issue-6693 branch January 4, 2024 01:11
@unlikelyzero unlikelyzero modified the milestones: Target:3.3.0, Target:4.0.0 Jan 17, 2024
@ozyx ozyx added type:enhancement and removed type:feature Feature. Required intentional design labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Element styling unusable in Stacked Plots and Flex Layouts
4 participants