-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add Windows 10 style window titlebar #508
Conversation
This pull request is automatically deployed with Now. |
Closing this as wontfix. It is not that we don't want to support Windows users, it is just that the style doesn't fit in with the rest of Carbon. |
@mfix22 So basically you don't want to support Windows users. |
I am confused about this decision as well, where does it not fit in? |
Sorry. To reiterate, we want to support it, I just want the design of the feature to fit it more with the design of the current components, meaning it fits the current aesthetic. For that reason, our team will be building out the SVGs for it 👍 Secondly, this branch has not been mergeable for months, so I thought you no longer wanted to champion this feature. It is apparent that is not true. Going forward, please keep the discussion positive — there is plenty of room to argue your case for keeping the feature without strawman-ing our team. |
@mfix22 I understand your point. You are correct, if you feel that the team could make better SVGs that "feel like Windows" and integrate with the existing style of Carbon, go for it. To address your second point; yes, I agree, this PR is incomplete and should not be merged yet. That is why I asked for help.
Basically I was requesting assistance with this, because I wasn't sure where to put the CSS that positions the titlebar buttons on the right of the window. For your third statement, what negativity did you see? Neither me nor @evaryont understood the reasoning behind closing this PR with no further comment. Your statement seemed to be an oxymoron, contradicting itself without further reasoning. My apologies if any offense was taken. Perhaps my reply was rash. |
Understood, I appreciate you explaining yourself. I never meant for closing the PR to be a permanent resolution — we could always open a new PR or reopen this one. I will look into supporting this feature while staying true to the Carbon aesthetic. |
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.
Make the controls picking a bit cleaner and open to additions of more controls.
@@ -36,7 +36,7 @@ function renderCopyButton({ copied }) { | |||
|
|||
export default ({ titleBar, theme, handleTitleBarChange, copyable, code }) => ( | |||
<div className="window-controls"> | |||
{theme === 'bw' ? <ControlsBW /> : <Controls />} | |||
{theme === 'bw' ? <ControlsBW /> : theme === 'win' ? <ControlsWin /> : <Controls />} |
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.
Replace this with f.e an object:
const controls = {
bw: <ControlsBW />,
win: <ControlsWin />
}
{ controls[theme] || <Controls /> }
81583c0
to
d8af796
Compare
@mfix22 just wondering what the status on this is? The age of this PR gave me the impression that this is not an active repo. |
@b3u this repo is still very much active, we have just had more important priorities to improving the application and code. We still want to support this, but in a way that stays true to the original style/brand/theme of Carbon. My apologies for the delay. Are you waiting on the Windows theme yourself? Or were you more just concerned about how active the repo is? 🙂 |
I had a PR I was going to make, and subsequently made; I was unsure about whether it would get merged. That's all. |
@b3u I am going to take a look at this feature tomorrow. If you have a version you want me to consider, please push up a PR 🙂 |
I have added the basic SVGs for this, added to the settings menu, and created the theme setting. I'm not sure if I did it properly, it took a lot of guesswork since I've never used Node or React before. It works, with a few caveats.
The icon in the settings menu looks terrible. I couldn't figure out how to make it, because I don't understand very well how SVG viewboxes work in conjunction with width and height.
The titlebar buttons are on the left. I got them on the right in the correct position using
text-align: right; right: 1px;
in the browser developer tools on the.window-controls
class, but could not figure out hoe to make the changes in the code itself. My attempt in the filecomponents/Carbon.js
can be seen below, added somewhere around line 219.With the above CSS, the style is pixel-perfect to match Windows. Unfortunately the positioning is not.
This pull request needs work, but I'm not sure how to do it myself. I hope this addition is sufficient for the maintainers to work off of.