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

[file-dialog] fix scaling issue for the file and save dialogs #5688

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

vince-fugnitto
Copy link
Member

@vince-fugnitto vince-fugnitto commented Jul 11, 2019

Fixes #1935

  • added the theia-ResponsiveFileDialog class so extenders can easily use the class to get the default styling of the file-dialog and its responsive media query.

Our file-dialog and save-dialog have scaling issues when the screen's viewport is limited. Since our dialogs are not implemented using React (which would handle scaling much easier), the problem was addressed using css media queries. This means that when the view becomes limited at 700px, the size of the file-tree is reduced allowing the entire dialog to more easily visible and the
actions buttons still accessible.

Before, the buttons were not visible which meant the useability
of the dialog was reduced.

height > 700px height < 700px
Screen Shot 2019-07-10 at 10 10 07 PM Screen Shot 2019-07-10 at 10 10 14 PM

Signed-off-by: Vincent Fugnitto [email protected]

@vince-fugnitto vince-fugnitto added enhancement issues that are enhancements to current functionality - nice to haves file dialog issues related to the file dialog labels Jul 11, 2019
@vince-fugnitto vince-fugnitto self-assigned this Jul 11, 2019
@vince-fugnitto vince-fugnitto requested a review from elaihau July 11, 2019 02:13
@kittaakos
Copy link
Contributor

Ohh, finally <3

Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

It works like a charm. Very nice! 👍

Would it be possible to generalize the following classes:

.dialogContent .theia-FileDialog,
.dialogContent .theia-SaveFileDialog {
    width: 500px;
}

.dialogContent .theia-FileDialog {
    height: 500px;
    background-color: var(--theia-layout-color0);
}

.dialogContent .theia-SaveFileDialog {
    height: 450px;
}

And have the same height and background-color for both the open file and save file dialogs. Generalize your changes a bit too. So when we add a third dialog later, we do not have to apply

@media only screen and (max-height: 700px) {
    .dialogContent .theia-MyThirdDialog {
        height: 300px;
     }
}

If it is not possible, or does not worth the effort, let's merge your changes as is. It is already a great improvement.

@vince-fugnitto
Copy link
Member Author

If it is not possible, or does not worth the effort, let's merge your changes as is. It is already a great improvement.

Sure, I can make the updates and improvements you suggested, glad you think its an improvement already :)

Fixes #1935

- added the `theia-ResponsiveFileDialog` class so extenders
can easily use the class to get the default styling of the
`file-dialog` and its responsive media query.

Our `file-dialog` and `save-dialog` have scaling issues
when the screen's viewport is limited. Since our dialogs
are not implemented using React (which would handle scaling much easier),
the problem was addressed using css media queries. This means that when
the view becomes limited at 700px, the size of the `file-tree` is
reduced allowing the entire dialog to more easily visible and the
actions buttons still accessible.

Before, the buttons were not visible which meant the useability
of the dialog was reduced.

Signed-off-by: Vincent Fugnitto <[email protected]>
@vince-fugnitto
Copy link
Member Author

@kittaakos I added a new class extenders can use theia-ResponsiveFileDialog which will give them access to the default styling of our file and save dialogs along with the responsiveness of the media query. Please let me know if it's what you had in mind :)

@kittaakos kittaakos self-requested a review July 11, 2019 11:17
Copy link
Contributor

@kittaakos kittaakos left a comment

Choose a reason for hiding this comment

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

It works nicely. 👍

@vince-fugnitto vince-fugnitto merged commit 2fa4738 into master Jul 11, 2019
@vince-fugnitto vince-fugnitto deleted the vf/GH-1935 branch July 11, 2019 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves file dialog issues related to the file dialog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[theia] Open workspace dialog scaling issue
2 participants