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

feat(cc-logs-control): init component #909

Merged
merged 3 commits into from
Jan 25, 2024
Merged

Conversation

pdesoyres-cc
Copy link
Contributor

@pdesoyres-cc pdesoyres-cc commented Dec 12, 2023

Fixes #908

What does this PR do?

3 commits:

  • refactor: extract and rework some methods that help for creating fake logs for <cc-logs-*> stories and sandbox
  • upgrade remix icon to get a new icon from the library
  • implement the new component itself

How to review?

  • Overall design
  • Code

A review from everyone would be great.

Copy link
Contributor

🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/cc-logs-controller/init/index.html.

This preview will be deleted once this PR is closed.

Copy link
Contributor

@florian-sanders-cc florian-sanders-cc left a comment

Choose a reason for hiding this comment

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

Well done @pdesoyres-cc this component looks great and the code is easy to read 👍

Most of my comments are nitpicks as usual and here is one more:

  • I think we should change the icon for the follow button. I always think I'm going to be able to download the logs and since this button is icon only, we should avoid ambiguous icons. I couldn't find a really good fit within the remix icons project but the scroll down examples form the Noun Project look decent enough to me. Maybe we could create an issue within the Remix project?

src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
src/components/cc-logs-controller/cc-logs-controller.js Outdated Show resolved Hide resolved
@pdesoyres-cc
Copy link
Contributor Author

let see how it goes

@pdesoyres-cc pdesoyres-cc force-pushed the cc-logs-controller/init branch from 8687efc to 42ac00f Compare December 19, 2023 14:25
Copy link
Contributor

@HeleneAmouzou HeleneAmouzou left a comment

Choose a reason for hiding this comment

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

GG @pdesoyres-cc ! 👏
The visual is very nice ! ✨ I went through the code and I have just left one question. Also about the cc-logs-controller, when I saw the scroll to bottom icon I though it was a button to download the logs. I haven't noticed it before and I don't know if I am the only one to have this impression or if there is another icon more appropriate. Otherwise, LGMT !

@pdesoyres-cc pdesoyres-cc force-pushed the cc-logs-controller/init branch 2 times, most recently from 5bfb534 to 60178ab Compare January 12, 2024 14:10
Copy link
Member

@hsablonniere hsablonniere left a comment

Choose a reason for hiding this comment

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

Hey @pdesoyres-cc, good job on this!! 👏

I added a few remarks and here are some global notes:

  • Now that I see the component, I'm not sure cc-logs-options is the right name
  • Will we put the future input for text filtering in this component or through the slot?
  • I was about to say "why do we need this component, why is it not directly in the main component ?"
    • Looking at the code, I understand why and it's a good way to isolate stuffs, even if it means mirroring a lot of properties
  • Can we have a story to show of the fact that we can select other options than the default ones?

@pdesoyres-cc pdesoyres-cc force-pushed the cc-logs-controller/init branch from 60178ab to 854865a Compare January 18, 2024 15:50
Copy link
Member

@hsablonniere hsablonniere left a comment

Choose a reason for hiding this comment

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

Thanks for your feedbacks and new commits 👍

I still have questions:

  • I'm not sure cc-logs-options is the right name but I don't want controller either, WDYT?
  • Will we put the future input for text filtering in this component or through the slot?
  • Can we have a story to show of the fact that we can select other options than the default ones?

@pdesoyres-cc
Copy link
Contributor Author

I'm not sure cc-logs-options is the right name but I don't want controller either, WDYT?

  • I can propose cc-logs-control so that we don't clash with the MVC design pattern's concept of controller.
  • I can propose cc-logs-wrapper but I don't like it very much as it doesn't say what it does.
  • I can propose cc-logs-tuner, cc-logs-manager, cc-logs-proxy, cc-logs-adapter

Will we put the future input for text filtering in this component or through the slot?

My first idea for the slot was to put the date range input, but there was not enough room.
Also, I wanted to put some loading indicators here, but finally, I found a better place.
The question is: does the text-filtering apply to addon logs, application logs, and access logs? I would say yes.

Having said that, we could get rid of the slot and plan the addition of the text-filtering input.

Can we have a story to show of the fact that we can select other options than the default ones?

yes, I'll do that.

@pdesoyres-cc pdesoyres-cc force-pushed the cc-logs-controller/init branch from 854865a to 34af45c Compare January 19, 2024 10:20
Copy link
Member

@Galimede Galimede left a comment

Choose a reason for hiding this comment

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

Nice work Pierre, LGTM! 💪

@hsablonniere
Copy link
Member

After a discussion with @pdesoyres-cc

  • About the name: cc-logs-control seems to be the better idea
  • Maybe we cold rename cc-logs into cc-logs-viewer
    • Pierre will decide on this one
  • Let's remove the slot, the text input will be part of this component

@pdesoyres-cc pdesoyres-cc changed the title feat(cc-logs-controller): init component feat(cc-logs-control): init component Jan 23, 2024
@pdesoyres-cc pdesoyres-cc force-pushed the cc-logs-controller/init branch from 34af45c to b4d51fa Compare January 23, 2024 09:36
@florian-sanders-cc
Copy link
Contributor

👋 Sorry that I did not notice it ealier: we're missing a focus style for checkboxes
Chrome
black focus outline on chrome for checkboxes
double focus outline on firefox for checkboxes

This should do the trick:

        input:focus {
          outline: var(--cc-focus-outline, #000 solid 2px);
          outline-offset: var(--cc-focus-outline-offset, 2px);
        }

Apart from that, LGTM!
About the name, we could also go for cc-logs-settings? But I'm fine with cc-logs-control too 😉

Copy link
Member

@roberttran-cc roberttran-cc left a comment

Choose a reason for hiding this comment

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

Congrats for the awesome work: there's an issue with a non-working story but LGTM for the rest!

src/components/cc-logs-control/cc-logs-control.stories.js Outdated Show resolved Hide resolved
@pdesoyres-cc pdesoyres-cc force-pushed the cc-logs-controller/init branch from 0c6475a to cd63fbb Compare January 23, 2024 16:36
@pdesoyres-cc pdesoyres-cc force-pushed the cc-logs-controller/init branch from cd63fbb to 24e6768 Compare January 25, 2024 10:32
@pdesoyres-cc pdesoyres-cc merged commit aff6229 into master Jan 25, 2024
4 checks passed
@pdesoyres-cc pdesoyres-cc deleted the cc-logs-controller/init branch January 25, 2024 10:47
Copy link
Contributor

🔎 The preview has been automatically deleted.

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.

cc-logs-control: init component
6 participants