Commit Graph

383 Commits

Author SHA1 Message Date
Dustin L. Howett (MSFT) 10c599eb17 Update SettingsSchema.md to fix #2121 (#2123)
* Update SettingsSchema.md to fix #2121
Fixes #2121.
* Update doc/cascadia/SettingsSchema.md
2019-07-29 09:45:11 -07:00
Mike Griese a2744529e6 Fixes #2090 (#2094) 2019-07-25 11:01:03 -07:00
Robert Jordan 89190c6e6c Add support for background image alignment (as one setting) (#1959)
* Implement base background image alignment settings

TerminalSettings now has two new properties:
* BackgroundImageHorizontalAlignment
* BackgroundImageVerticalAlignment

These properties are used in TermControl::_InitializeBackgroundBrush to specify the alignment for TermControl::_bgImageLayer.

This is a base commit that will split into two possible branches:
* Use one setting in profiles.json: "backgroundImageAlignment"
* Use two settings in profiles.json: "backgroundImageHorizontal/VerticalAlignment"

* Implement background image alignment profile setting

Implement background image alignment as one profile setting.
* This has the benefit of acting as a single setting when the user would likely want to change both horizontal and vertical alignment.
* HorizontalAlignment and VerticalAlignment are still stored as a tuple in Profile because they are an optional field. And thus, it would not make sense for one of the alignments to be left unused while the other is not.
* Cons are that the tuple signature is quite long, but it is only used in a small number of locations. The Serialize method is also a little mishapen with the nested switch statements. Empty lines have been added between base-level cases to improve readability.

* Fix capitalization typo for BackgroundImageStretchModeKey

In Profiles.cpp, the key for the image stretch mode json property had a lowercase 'i' in "Backgroundimage", not following proper UpperCamelCase.
The "i" has been capitalized and the two usages of the constant have been updated as well.

* Document Background Image settings

* Adds entries SettingsSchema.md for the original 3 backgroundImage settings in addition to the new backgroundImageAlignment setting.

* Fix setting capitalization error in UsingJsonSettings.md

* The background image example in UsingJsonSettings.md listing a backgroundImageStretchMode of "Fill" has been corrected to "fill".


Fixes #1949.
2019-07-24 21:47:06 -07:00
Michael Niksa 2c3e175f62
Doc of stuff I've explained. (#1942)
* Doc of stuff I've explained.

* add a few more

* archive fulltext of comments and link back to originals, attempt to make relative anchor links for jumping.
2019-07-24 14:10:33 -07:00
Mike Griese 0905140955
Refactor TerminalApp and Add Tests for Xaml Content (#1164)
* Refactors TerminalApp into two projects: 
  - TerminalAppLib, which builds a .lib, and includes all the code
  - TerminalApp, which builds a dll by linking the lib
* Adds a TerminalApp.Unit.Tests project
  - Includes the ability to test cppwinrt types we've authored using a SxS manifest for unpackaged winrt activation
  - includes the ability to test types with XAML content using an appxmanifest
* Adds a giant doc explaining how this was all done. Really, just go read that doc, it'll really help you understand what's going on in this PR.

-------------------------
These are some previous commit messages. They may be helpful to future readers.

* Start adding unittests for json parsing, end up creating a TerminalAppLib project to make a lib. See #1042

* VS automatically did this for me

* This is a dead end

  I tried including the idl-y things into the lib, but that way leads insanity

  If you want to make a StaticLibrary, then suddenly the winrt toolchain forgets
  that ProjectReferences can have winmd's in them, so it won't be able to
  compile any types from the referenced projects. If you instead try to manually
  reference the types, you'll get duplicate types up the wazoo, which of course
  is insane, since we're referencing them the _one_ time

* Yea just follow #1042 on github for status

  So current state:

  1. If you try to add a `Reference` to all of MUX.Markup, TerminalControl and
     TerminalSettings, then mdmerge will complain about all   the types from
     TerminalSettings being defined twice. In this magic scenario, the
     dependencies of TerminalControl are used directly   for some reason:

```
  12>    Load input metadata file ...OpenConsole\x64\Debug\TerminalSettings\Microsoft.Terminal.Settings.winmd.
  12>    Load input metadata file ...OpenConsole\x64\Debug\TerminalControl\Microsoft.Terminal.Settings.winmd.
  12>    Load input metadata file ...OpenConsole\x64\Debug\TerminalControl\Microsoft.Terminal.TerminalConnection.winmd.
  12>    Load input metadata file ...OpenConsole\x64\Debug\TerminalControl\Microsoft.Terminal.TerminalControl.winmd.
  12>    Load input metadata file ...OpenConsole\x64\Debug\Microsoft.UI.Xaml.Markup\Microsoft.UI.Xaml.Markup.winmd.
```

  2. If you don't add a `Reference` TerminalControl, then it'll complain about
     being unable to find the type TitleChangedEventArgs,   which is defined in
     TerminalControl.

  3. If you don't add a `Reference` TerminalSettings, then it'll complain about
     being unable to find the type KeyChord and other   types from
     TerminalSettings. In this scenario, it doesn't recurse on the other
     dependencies from TerminalControl for whatever   reason.

  4. If you instead try to add all 3 as a `ProjectReference`, then it'll
     complain about being unable to find TitleChangedEventArgs,   as in 2.
     Presumably, it;ll have troubles with the other types too, as none of the 3
     are actually included in the midlrt.rsp file.

  5. If you add all 3 as a `ProjectReference`, then also add TerminalControl as
     a `Reference`, you'll get a `MIDL2011: [msg]  unresolved type declaration
     Microsoft.UI.Xaml.Markup.XamlApplication`

  6. If you add all 3 as a `ProjectReference`, then also add TerminalControl AND
     MUX.Markup as a `Reference`, you'll get the same   result as 3.

* what if we just don't idl

  This seems to compile

* This compiles but I broke the MUX resources

  look at the App.xaml change. in this changelist. That's what's broken right now. Lets fix that!

* lets do this

    If I leave the MUX nuget out of the project, I'll get a compile error in
    App.xaml:

    ```
    ...OpenConsole\src\cascadia\TerminalApp\App.xaml(21,40): XamlCompiler error WMC0001: Unknown type 'XamlControlsResources' in XML namespace 'using:Microsoft.UI.Xaml.Controls'
    ```

    If I add it back to the project, it works

* Some cleanup from the previous commit

* This is busted again.

  Doing a clean build didn't work.

    A clean rebuild of the project, paired with some removal of dead code
    revealed a problem with what I have so far.

    TerminalAppLib depends on the generation of two headers,
    `AppKeyBindings.g.h` and `App.g.h`, as those define some of bits of the
    winrt types. They're needed to be able to compile the implementations.
    Presumably that's not getting generated by the lib project, because the dll
    project is the one to generate that file.

    So we need to move the idl's to the lib project. This created maddness,
    because of course the Duplicate Type thing. The solution to that is to
    actually mark the winrt DLLs that we're chaining up through us as

    ```
        <Private>false</Private>
        <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
    ```

    This will prevent them from getting double-included.

    This still doesn't work however, since
    ```
    app.cpp(40): error C2039: 'XamlMetaDataProvider': is not a member of 'winrt::TerminalApp'
    error C3861: 'XamlMetaDataProvider': identifier not found
    ```

    So we need to figure that out. The dll project is still generating the right
    header, so lets look there.

* Move the xaml stuff to the lib

  This compiles, but when we launch, we fail to load the tabviewcontrol
  resources again. So that's not what you want. Why is it not included?

* It works again!

  * Use the pri, xbf files from TerminalAppLib, not TerminalApp
  * Manually make TerminalApp include a reference to TerminalAppLib's
    TerminalApp.winmd. This will force the build to copy TerminalApp.winmd to
    TerminalApp/, which WindowsTerminal needs to be able to ProjectReference the
    TerminalApp project (it's expecting it to have a winmd)
  * Remove the module.g.cpp from TerminalApp, and move to TerminalAppLib. The
    dll doesn't do any codegen anymore.

* Agressively clean up these files

* Clean up unnecessary includes in the dll pch.h

* This does NOT work.

  The WindowsxamlManager call crashes. I'm thinking it has to do with activation
  of winrt types from a dll.

  Email out to @Austin-Lamb to see if he can assist

* This gets our cppwinrt types working, but xaml islands is still broken

* Split the tests apart, so they aren't insane

* These are the magic words to make xaml islands work

* All this witchcraft is necessary to make XAML+MUX work right

* Clean this up a bit and add comments

* Create an enormous doc explaining this madness

* Unsure how this got changed.

* Trying to get the CI build to work again.

  This resolves the MUX issue. We need to manually include it, because their package's target doesn't mark it as CopyLocalSatelliteAssemblies=false, Private=false.

  However, the TerminalApp project is still able to magically reason that the TerminalAppLib project should be included in the MdMerge step, because it think's it's a `GetCppWinRTStaticProjectReferences` reference.

* Update cppwinrt to the latest version - this fixes the MSBuild

  * I still need to re-add the KeyModifiers checks from TermControl. I think
    this update broke `operator&` for that enum.
  * There needs to be some cleanup obviously
  * The doc should be updated as well

* Clean up changes from cppwinrt update

* Try doing this, even though it seems wrong

* Lets try this (press x to doubt)

* Clean up vcxproj file, and remove appxmanifest change from previous commit

* Update to the latest TAEF release, maybe that'll work

* Let's try a prerelease version, shall we?

* Add notes about TAEF package, comment out tests

* Format the code

* Hopefully fix the arm64 and x86 builds

  also a typo

* Fix PR nits

* Fix some bad merge conflicts

* Some cleanup from the merge

* Well I was close to getting the merge right

* I believe this will fix CI

* Apply suggestions from code review

Co-Authored-By: Carlos Zamora <carlos.zamora@microsoft.com>

* These definitely need to be fixed

* Try version detecting in the test

  IDK if this will build, I'm letting the CI try while I clean rebuild locally

* Try blindly updating to the newest nuget version

* Revert "Try blindly updating to the newest nuget version"

This reverts commit b72bd9eb73.

* We're just going to see if these work in CI with this change

* Comment the tests back out. Windows Server 2019 is 10.0.17763.557

* Remove the nuget package

  We don't need this package anymore now that we're hosting it

* Okay this _was_ important
2019-07-15 14:27:56 -05:00
ksyx fad7638bb3 user docs: Fix the capitalization on “Color Schemes” (#1953) 2019-07-13 11:17:11 -07:00
Carlos Zamora 6d3001f3b8
Double and Triple Click Selection (#1197) 2019-07-11 16:06:18 -07:00
Gautam Naik cfbc9e8f9f Added fontSize and acrylicOpacity changing tip (#1889)
* Added fontSize and acrylicOpacity changing tip

Added Terminal tip about changing the font size and acrylic opacity using keyboard shortcuts.

* Update index.md
2019-07-09 12:19:06 -07:00
Alec Clews c9d8e3ee2b The start of some User docs (#1577)
* Start User docs

* Fix typos

* Addded some more TODO

* Update doc/user-docs/index.md

Co-Authored-By: Michael Niksa <miniksa@microsoft.com>

* Update doc/user-docs/index.md

Co-Authored-By: Michael Niksa <miniksa@microsoft.com>

* Update doc/user-docs/index.md

Co-Authored-By: Michael Niksa <miniksa@microsoft.com>

* Update doc/user-docs/index.md

Co-Authored-By: Michael Niksa <miniksa@microsoft.com>

* Updated from suggestions in the PR

* Improve path to profiles.json

* Added some details about Json settings

* Example Json settings, and a #TODO

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/UsingJsonSettings.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* Update doc/user-docs/index.md

Co-Authored-By: Kayla Cinnamon <48369326+cinnamon-msft@users.noreply.github.com>

* After review and make colour US.

1. Merged in comments from PR
2. Made colour color :-(
3. Other tidy ups

* Added more detais about background images

* Remove some TODO comments and minot tidy up

* Get rid of TODO

1. Some notes abouet cut and paste -- needs more work
2. Get rid of TODO -- replace with links to issues
3. Add some extra notes about URI for background images
2019-07-08 11:17:19 -07:00
Kayla Cinnamon eda6547ba3 added default values to global and profiles (#1784) 2019-07-05 10:04:14 -07:00
Michael Niksa eae920e5f9
Propose banner at top of templates (#1687)
* Propose banner at top of issue templates

Getting tired of obvious low quality issues and I want to provide the warning that we may start closing things without further explanation as our volume is too high to deal with junk issues.

* Add bot rule information too.
2019-07-03 11:44:37 -07:00
Kayla Cinnamon c791b7870d
Add support for setting a profile's tab title (#1358)
tab renaming functionality
2019-07-02 10:09:22 -07:00
PankajBhojwani 10ed3991fc
Spec for #1235 Azure Cloud Shell connector (#1624)
* Azure connector spec
2019-06-28 15:48:19 -07:00
Michael Niksa 688c96cba9
Update bot tag system enforcement
I added the new rule that `Resolution-Duplicate` doesn't require the other tags. This documents the change.
2019-06-28 09:40:28 -07:00
Michael Niksa c0720525c5
Update bot doc for In-PR label rule (#1678) 2019-06-27 12:47:11 -07:00
Oskar Oldorf a5f31f77bc doc: Add ColorTool link to profiles.json documentation (#1396) 2019-06-22 18:18:14 -07:00
Kayla Cinnamon 03e3d8a685 Add profiles.json documentation (#883)
Co-Authored-By: Summon528 <cody880528@hotmail.com>
Co-Authored-By: Carlos Zamora <carlos.zamora@microsoft.com>
2019-06-17 17:52:00 -07:00
Andy Zhu 2266313f35 Code highlighting and capitalization fix for doc/EXCEPTIONS.md (#1283)
* Mark NTSTATUS, HRESULT, and wil::unique_ptr as inline code snippets

* Change encapsulate on line 14 to lower case to be consistent with the other rules
2019-06-17 23:41:27 +00:00
adiviness 9b92986b49
add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
Mike Griese 2da5b0b146
Add support for multiple panes in the same window (#825)
* Start working on adding support for panes

  See #1000 for the panes megathread on remaining work.

  The functionality will be there, but the keybinding won't be there, so people have to
  opt-in to it.
2019-06-07 16:56:44 -05:00
Oisin Grehan 6b51d783c2 added UTF8 torture test text file and a solution dependency graph diagram. (#1166) 2019-06-07 15:54:04 -05:00
Rich Turner 16c32a622e
Docs: Contributor's guide and spec-template (#967)
Submitting first draft of spec template, and `contributing.md` outlining our guidance on how to engage with us, file issues, suggest features, submit changes, etc.
2019-06-05 13:54:21 -07:00
Michael Niksa a0ebd2ed1b Create Bot.md (#884)
* Create Bot.md

#882

* Update Bot.md

* Rename Bot.md to bot.md

* Update doc/bot.md

Co-Authored-By: Dustin L. Howett (MSFT) <duhowett@microsoft.com>

* Update bot.md

* Update bot.md
2019-05-20 14:27:36 +00:00
Jamie e0f131121b Fixed typo's and improved consistency. (#704) 2019-05-15 21:02:42 -07:00
Mario Kneidinger a12521ffd3 Changed "Windows Internal Library" to "Windows Implementation Library" (#827) 2019-05-15 12:28:22 -07:00
Michael Niksa 7c6278de44
Fix WIL doc summary (#786)
- "Windows Internal Library" got named "Windows Implementation Library" for its GH release
- Fixed the links to point to the files in the WIL GH instead of the local copies.
- Left the rest of this as general guidance to how we use it.
2019-05-14 13:11:41 -07:00
Andy Muehlhausen fc49caca8a Update EXCEPTIONS.md (#736)
updated to indicate HRESULT is preferred over NTSTATUS, as suggested in 
https://github.com/Microsoft/Terminal/blob/master/doc/STYLE.md

[skip ci]
2019-05-13 09:14:41 -07:00
jroberts101 cb17115c72 doc: fix some more instances of "it's" (#551)
part 2/2

[skip ci]
2019-05-08 21:31:15 -07:00
jroberts101 2aed13ac37 doc: fix some instances of "it's" (#552)
part 1/2

[skip ci]
2019-05-08 21:30:41 -07:00
SLaks 501a4a5e59 doc: Fix typo (#434) 2019-05-07 08:32:37 -07:00
0xflotus dda4ef23c8 Update WindowsTestPasses.md (#470) 2019-05-07 08:31:41 -07:00
Cyandev 47cebce11c docs: fix ORGANIZATION.md hierarchy issues (#478) 2019-05-07 07:28:50 -07:00
Dustin Howett d4d59fa339 Initial release of the Windows Terminal source code
This commit introduces all of the Windows Terminal and Console Host source,
under the MIT license.
2019-05-02 15:29:04 -07:00