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

Created conditional show minimize/maximize action buttons on window component #2286

Closed

Conversation

cesarochoa2006
Copy link

@cesarochoa2006 cesarochoa2006 commented Mar 21, 2020

Please read and mark the following check list before creating a pull request:

Short description of what this resolves:

Adds a new feature that show/hide action buttons (minimize/maximize) with the config option "showActions" of window component that can be configured when the component is used. By default, it works like before, and the added option is by default true, so can be changed to false whenever it is desired to work. Also, added the css class no actions, to correctly display the close button when the actions buttons are not shown.
This feature is added because i had the need of hide minimize/maximize buttons of a window component.

@codecov
Copy link

codecov bot commented Mar 21, 2020

Codecov Report

Merging #2286 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2286   +/-   ##
=======================================
  Coverage   81.53%   81.53%           
=======================================
  Files         244      244           
  Lines        7377     7378    +1     
  Branches      773      773           
=======================================
+ Hits         6015     6016    +1     
  Misses       1135     1135           
  Partials      227      227           
Impacted Files Coverage Δ
...mework/theme/components/window/window.component.ts 83.01% <ø> (ø)
...ramework/theme/components/window/window.options.ts 100.00% <100.00%> (ø)

@naingaungphyo
Copy link

naingaungphyo commented Mar 27, 2020

Any update about when will this feature be merged and released?

@naingaungphyo
Copy link

naingaungphyo commented Mar 27, 2020

@cesarochoa2006
Thanks for the great work! It will be great if there is an option to disable each button that we don't want.
For me, I think "maximize" button is not really useful. So I want to have only "minimize" button and "close" button.

@cesarochoa2006
Copy link
Author

cesarochoa2006 commented Apr 4, 2020 via email

@naingaungphyo
Copy link

fyi,
current workaround for me to hide them manually is hiding them with overwriting css.

@cesarochoa2006
Copy link
Author

fyi,
current workaround for me to hide them manually is hiding them with overwriting css.

¿ But with css you hide all buttons ? I need the close button displayed

@naingaungphyo
Copy link

nope, I can hide specific button with css coz they have different class to be overwritten.

@cesarochoa2006
Copy link
Author

cesarochoa2006 commented May 8, 2020 via email

@naingaungphyo
Copy link

naingaungphyo commented May 8, 2020

sorry, I said wrong information. I hide with nth-child selectors like this.

// hide maximize
nb-windows-container> nb-window > nb-card > nb-card-header> div:nth-child(2)> button:nth-child(2)
{
  display: none;
}
nb-windows-container>nb-window>nb-card>nb-card-header>.buttons
{
  justify-content: flex-end !important;
}
// hide minimize
.no-minimize-window > nb-card > nb-card-header> div:nth-child(2)> button:first-child
{
  visibility: hidden;
}

@cesarochoa2006
Copy link
Author

cesarochoa2006 commented May 8, 2020 via email

@JamesKnippel
Copy link

Would be great to be able to add a confirmation dialog on the close button as well. Shame this hasn't been pushed yet.

@naingaungphyo
Copy link

@JamesKnippel Yeah.
Also I want to hold the state of the dialog input value before the dialog being minimized. onDestroy is called when we minimize the dialog and BOOM! all the value of inputs are gone. So even I call the dialog again from minimize state, I can't get the old form state back.

@JamesKnippel
Copy link

@naingaungphyo That's my biggest problem too - I'm looking into some sort of solution with maybe storing template data on a backend with post requests and repopulating from a temporary form-data table.

I want to be able to walk away and open up the same minimized windows on another computer with the same state from old forms. I'll let you know if I come up with any workarounds.
I really wish Nebular was more open with communications! I really love the framework and this Window is probably their most standout component with so much potential

@yggg
Copy link
Contributor

yggg commented Nov 30, 2021

Closed by #2762

@yggg yggg closed this Nov 30, 2021
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.

None yet

4 participants