-
Notifications
You must be signed in to change notification settings - Fork 18
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
refactor(cc-tcp-components)!: rework properties to avoid impossible … #1053
base: master
Are you sure you want to change the base?
Conversation
5d2f920
to
a0e6a4b
Compare
🔎 A preview has been automatically published : https://clever-components-preview.cellar-c2.services.clever-cloud.com/cc-tcp-redirection-form/state-migration/index.html. This preview will be deleted once this PR is closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done. Bellow some questions and nitpicks.
src/components/cc-tcp-redirection/cc-tcp-redirection.types.d.ts
Outdated
Show resolved
Hide resolved
src/components/cc-tcp-redirection-form/cc-tcp-redirection-form.types.d.ts
Outdated
Show resolved
Hide resolved
src/components/cc-tcp-redirection-form/cc-tcp-redirection-form.js
Outdated
Show resolved
Hide resolved
src/components/cc-tcp-redirection-form/cc-tcp-redirection-form.smart.js
Outdated
Show resolved
Hide resolved
src/components/cc-tcp-redirection-form/cc-tcp-redirection-form.smart.js
Outdated
Show resolved
Hide resolved
src/components/cc-tcp-redirection-form/cc-tcp-redirection-form.smart.js
Outdated
Show resolved
Hide resolved
@@ -1,21 +1,21 @@ | |||
interface TcpRedirection { | |||
namespace: string; | |||
isPrivate: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: I don't see when this property is filled. Is it really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We noticed that private
was used instead of isPrivate
within the stories before and we fixed this issue but we had not thought about checking the API & the smart about this subject.
Turns out the API never gives you this info and the "private" feature of the component is never used. Private namespaces are displayed like normal namespaces:
Within the smart, we could determine that a namespace is private if its name is something other than default
or cleverapps
but it would be better if the API sent us this info, WDYT?
Pinging @hsablonniere in case he knows more about this subject 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure but it should be used for users that have their own custom load balancer. Can you check with Florentin and look in the cc-admin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An issue has been created on the API side.
We can confirm that right now, this is not used at all within the console because the API does not provide this info in any way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(discussed on Slack)
In the meantime we have decided to handle it within the smart so I'll take care of it
a0e6a4b
to
f79f365
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, congrats! 💪 👏
Apart from Pierre's feedback which I agree and a few nitpicks, LGTM 🙂
…states BREAKING CHANGE: the properties have changed - The `redirection` component property has been renamed to `state` - The `redirection.state` state property has been renamed to `state.type`
…ible states BREAKING CHANGE: the properties have changed - The `redirections` component property has been renamed to `state` - The `redirections.state` state property has been renamed to `state.type` - The `redirections.value` state property has been renamed to `state.redirections`
700bcc0
to
9e46eb9
Compare
9e46eb9
to
c697d3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @florian-sanders-cc and @HeleneAmouzou, well done on this one. I don't see anything blocking, I just wrote a few notes I wanted to share.
@@ -1,21 +1,21 @@ | |||
interface TcpRedirection { | |||
namespace: string; | |||
isPrivate: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure but it should be used for users that have their own custom load balancer. Can you check with Florentin and look in the cc-admin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (with a non blocking nitpick)
<cc-notice intent="warning" message="${i18n('cc-tcp-redirection-form.error')}"></cc-notice> | ||
` : ''} | ||
|
||
${this.state.type === 'loading' ? html` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: You could merge the 'loading' and 'loaded' HTML logic with a unique list of redirections. Where this list of redirection is initialized before, according to the loading/loaded state.
What does this PR do?
cc-tcp-redirection
andcc-tcp-redirection-form
components to implement our new state structure,cc-tcp-redirection
andcc-tcp-redirection-form
components and their stories,How to review?
cc-tcp-redirection
prod stories to the preview stories and thecc-tcp-redirection-form
prod stories to the preview stories,