Hide console option in view menu #545

Merged
hrgdavor merged 7 commits from feat-hide-console into main 2021-10-12 11:44:16 +02:00
hrgdavor commented 2021-10-04 23:38:32 +02:00 (Migrated from github.com)

This was simplest way I could find and is fine for me. Menu item is enough, no ned for a button on console pane.

This was simplest way I could find and is fine for me. Menu item is enough, no ned for a button on console pane.
franknoirot (Migrated from github.com) reviewed 2021-10-04 23:38:32 +02:00
Irev-Dev commented 2021-10-05 09:55:32 +02:00 (Migrated from github.com)

Thanks @hrgdavor,
I should be able to take a look after Thursday.

Thanks @hrgdavor, I should be able to take a look after Thursday.
Irev-Dev commented 2021-10-10 12:27:03 +02:00 (Migrated from github.com)

I'll implement the toggle in the side bar when I get a moment.

I'll implement the toggle in the side bar when I get a moment.
Irev-Dev commented 2021-10-10 23:04:07 +02:00 (Migrated from github.com)

I've updated the description in #540 to give better instructions and added the hacktoberfest label to it incase someone wants to have a crack. Do you want to have another go @hrgdavor? I can assign you or we can wait to see if someone picks it up?

I've updated the description in #540 to give better instructions and added the hacktoberfest label to it incase someone wants to have a crack. Do you want to have another go @hrgdavor? I can assign you or we can wait to see if someone picks it up?
hrgdavor commented 2021-10-10 23:32:28 +02:00 (Migrated from github.com)

I will give it a go.

however, this variant with setLayout is bit awkward, but will work I guess.

I will give it a go. however, this variant with setLayout is bit awkward, but will work I guess.
hrgdavor commented 2021-10-11 00:10:31 +02:00 (Migrated from github.com)

@franknoirot I made it with a simple checkbox, is a new toggle component ready ?

@Irev-Dev pls review

@franknoirot I made it with a simple checkbox, is a new toggle component ready ? @Irev-Dev pls review
franknoirot commented 2021-10-11 03:57:37 +02:00 (Migrated from github.com)

Oh dang @hrgdavor I missed your comment earlier saying deal, yeah I can make a quick toggle component!

Oh dang @hrgdavor I missed your comment earlier saying deal, yeah I can make a quick toggle component!
hrgdavor commented 2021-10-11 09:04:07 +02:00 (Migrated from github.com)

Oh dang @hrgdavor I missed your comment earlier saying deal, yeah I can make a quick toggle component!

There is also a Switch component used in customizer, but that seems like sth builtin to swap 2 different sets of html, and not an actual toggle component.

> Oh dang @hrgdavor I missed your comment earlier saying deal, yeah I can make a quick toggle component! There is also a Switch component used in customizer, but that seems like sth builtin to swap 2 different sets of html, and not an actual toggle component.
Irev-Dev commented 2021-10-11 13:24:13 +02:00 (Migrated from github.com)

@hrgdavor,

however, this variant with setLayout is bit awkward, but will work I guess.

What is awkward? Are you talking about developing it is awkward? or are talking about for the user?

This was simplest way I could find and is fine for me

I never really understood this comment, do you think being able to hide the console will be useful for other users as well?

Thanks for having another go, the implementation is still a bit rough and results in the user's previous setup being disregarded so I've made my own update to not waste any more of your time (see 0fda7eb). More details here:

https://user-images.githubusercontent.com/29681384/136781701-bb81599c-d680-429b-9d87-5d4ea064adbc.mov

Are you happy to commit directly to this branch to add the toggle @franknoirot?

@hrgdavor, > however, this variant with setLayout is bit awkward, but will work I guess. What is awkward? Are you talking about developing it is awkward? or are talking about for the user? > This was simplest way I could find and is fine for me I never really understood this comment, do you think being able to hide the console will be useful for other users as well? Thanks for having another go, the implementation is still a bit rough and results in the user's previous setup being disregarded so I've made my own update to not waste any more of your time (see 0fda7eb). More details here: https://user-images.githubusercontent.com/29681384/136781701-bb81599c-d680-429b-9d87-5d4ea064adbc.mov Are you happy to commit directly to this branch to add the toggle @franknoirot?
Irev-Dev (Migrated from github.com) reviewed 2021-10-11 13:28:41 +02:00
Irev-Dev (Migrated from github.com) commented 2021-10-11 13:28:41 +02:00

Mutating state like this will cause problems down the road. By never mutating state, means we can reliably use weak/shallow equality. So mutations are not allowed.

Mutating state like this will cause problems down the road. By never mutating state, means we can reliably use weak/shallow equality. So mutations are not allowed.
hrgdavor commented 2021-10-11 14:33:19 +02:00 (Migrated from github.com)

yes it was awkward to implement. I am not used to so many rules what not to do. I did not have a clear picture how to implement it, let's say properly.

Hopefuly I can be more useful in the future, I am better at copying existing code, as I am not motivated to learn all of the libraries/frameworks here :)

yes it was awkward to implement. I am not used to so many rules what not to do. I did not have a clear picture how to implement it, let's say properly. Hopefuly I can be more useful in the future, I am better at copying existing code, as I am not motivated to learn all of the libraries/frameworks here :)
franknoirot commented 2021-10-12 04:42:37 +02:00 (Migrated from github.com)

I hear ya @hrgdavor these panels are tricky. @Irev-Dev I've added in a toggle that works like so:

https://user-images.githubusercontent.com/23481541/136882183-ae058c6d-776d-4445-8263-e748befa0c33.mp4

I hear ya @hrgdavor these panels are tricky. @Irev-Dev I've added in a toggle that works like so: https://user-images.githubusercontent.com/23481541/136882183-ae058c6d-776d-4445-8263-e748befa0c33.mp4
Irev-Dev (Migrated from github.com) reviewed 2021-10-12 11:42:53 +02:00
@@ -0,0 +15,4 @@
top: '50%',
transform: checked
? 'translate(-100%, -50%)'
: 'translate(0%, -50%)',
Irev-Dev (Migrated from github.com) commented 2021-10-12 11:42:52 +02:00

Sorry I think I put you onto this pattern, theres just one nuance in that it needs to be done within a template string so that the result is aways a string, i.e. assigning a boolean to className puts a whole bunch of noise in the console since it needs to be a string.

Sorry I think I put you onto this pattern, theres just one nuance in that it needs to be done within a template string so that the result is aways a string, i.e. assigning a boolean to `className` puts a whole bunch of noise in the console since it needs to be a string.
Irev-Dev (Migrated from github.com) approved these changes 2021-10-12 11:43:59 +02:00
Irev-Dev (Migrated from github.com) left a comment

Looks good, @hrgdavor and @franknoirot for getting this over the line 🎉

Looks good, @hrgdavor and @franknoirot for getting this over the line 🎉
Irev-Dev commented 2021-10-12 11:45:15 +02:00 (Migrated from github.com)

Team effort!
image

Team effort! ![image](https://user-images.githubusercontent.com/29681384/136932962-9434860f-9715-4d23-8fa7-0e50b78d3afe.png)
Irev-Dev commented 2021-10-12 11:57:27 +02:00 (Migrated from github.com)

Live now.

Live now.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#545