Skip to content

Commit cdd9a6b

Browse files
authored
Merge pull request #174 from sboulema/feature/compact_#172
feat: Add option to enable compact mode
2 parents e53d820 + e0754c2 commit cdd9a6b

17 files changed

Lines changed: 177 additions & 59 deletions

.github/workflows/workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- 'feature/**'
88

99
env:
10-
version: '10.7.${{ github.run_number }}'
10+
version: '10.8.${{ github.run_number }}'
1111
dotnetVersion: '8'
1212
repoUrl: ${{ github.server_url }}/${{ github.repository }}
1313
vsixPath: src/CodeNav/bin/Release/net472/CodeNav.vsix

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<img src="https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Logo_90x90.png" />
1+
<img src="https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Logo_90x90.png" />
22

33
# CodeNav
44
Visual Studio extension to show the code structure of your current document
55

66
[![Sponsor](https://img.shields.io/badge/-Sponsor-fafbfc?logo=GitHub%20Sponsors)](https://github.com/sponsors/sboulema)
77

8-
## Features
8+
# Features
99
- Quickly see all the important methods and properties in your document
1010
- Never get lost during a refactoring of a super long document
1111
- Clicking on an item in the list will take you to that location in the document
@@ -23,27 +23,28 @@ Visual Studio extension to show the code structure of your current document
2323
- Bookmarks
2424
- Synced collapsing/expanding outline regions
2525
- Option to hide the tool window for unsupported files and files without code items
26+
- Compact mode with less spacing optimizing screen real estate
2627

2728

28-
## Supported Visual Studio versions
29+
# 💻 Supported Visual Studio versions
2930

3031
- Visual Studio 2022 (Untested)
3132
- Visual Studio 2026
3233

33-
## Language support
34+
# 🔤 Language support
3435
- C#
3536

36-
## Installing
37-
[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026) [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/v/SamirBoulema.CodeNav2026.svg?style=flat)](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026)
37+
# ⬇️ Installing
38+
[Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=SamirBoulema.CodeNav2026)
3839

3940
[GitHub Releases](https://github.com/sboulema/CodeNav/releases)
4041

4142
[Open VSIX Gallery](https://www.vsixgallery.com/extension/CodeNav.dcdbcca4-3a88-432f-ba04-eb4a4cb64437)
4243

43-
## Usage
44+
# 🤲 Usage
4445
The CodeNav tool window can be opened via the entry in the `Extensions` menu.
4546

46-
## Screenshots
47+
# 🖼️ Screenshots
4748
![Preview](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Screenshot-light.png) ![Preview-Dark](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Screenshot-dark.png)
4849

4950
#### Filter window
@@ -55,5 +56,8 @@ The CodeNav tool window can be opened via the entry in the `Extensions` menu.
5556
#### Bookmarks
5657
![Bookmarks](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Bookmarks.png)
5758

58-
## Documentation
59+
#### Compact mode
60+
![Compact](https://raw.githubusercontent.com/sboulema/CodeNav/main/art/Compact.png)
61+
62+
# 📄 Documentation
5963
Looking for more info? Read the full [Documentation](https://github.com/sboulema/CodeNav/blob/main/docs/index.md) with links, guides, troubleshooting, and tips.

art/Compact.png

47.7 KB
Loading

art/Screenshot-light.png

-1.1 KB
Loading

art/Settings.png

1.44 KB
Loading

docs/settings.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ Enable or disable highlighting the item in CodeNav based on caret position
1818

1919
Enable or disable showing the CodeNav tool window for unsupported files and files without code items
2020

21+
**Use compact mode with less spacing**
22+
23+
Enable or disable showing items in a condensed form with less vertical spacing optimizing screen real estate
24+
2125
**Update CodeNav while typing**
2226

2327
Enable of disable updating the list of code items in CodeNav while typing in the text editor

src/CodeNav.OutOfProc/CodeNav.OutOfProc.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
<None Remove="ToolWindows\Templates\HighlightNameStyle.xaml" />
3939
<None Remove="ToolWindows\Templates\ItemContextMenu.xaml" />
4040
<None Remove="ToolWindows\Templates\ToolbarStyles.xaml" />
41+
<None Remove="ViewModels\CodeItem.cs~RF32119e8.TMP" />
4142
<EmbeddedResource Include="Dialogs\FilterDialog\FilterDialogControl.xaml" />
4243
<EmbeddedResource Include="Dialogs\SettingsDialog\SettingsDialogControl.xaml" />
4344
<EmbeddedResource Include="ToolWindows\CodeNavToolWindowControl.xaml" />

src/CodeNav.OutOfProc/Dialogs/FilterDialog/FilterDialogControl.xaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
<Style TargetType="GridViewColumnHeader">
1717
<Setter Property="Background" Value="{DynamicResource {x:Static styles:VsBrushes.GridHeadingBackgroundKey}}"/>
1818
<Setter Property="Foreground" Value="{DynamicResource {x:Static styles:VsBrushes.GridHeadingTextKey}}"/>
19-
<Setter Property="Margin" Value="-4,-2,0,0"/>
20-
<Setter Property="Padding" Value="4,2,0,0"/>
19+
<Setter Property="Margin" Value="-4 -2 0 0"/>
20+
<Setter Property="Padding" Value="4 2 0 0"/>
2121
<Setter Property="BorderThickness" Value="0"/>
2222
<Setter Property="FontWeight" Value="Bold"/>
2323
</Style>
2424
<!-- General Styles -->
2525
<Style TargetType="ComboBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogComboBoxStyleKey}}"/>
2626
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogTextBoxStyleKey}}"/>
2727
<Style TargetType="TextBlock">
28-
<Setter Property="Margin" Value="0,0,0,8" />
28+
<Setter Property="Margin" Value="0 0 0 8" />
2929
</Style>
3030
<Style TargetType="CheckBox">
3131
<Setter Property="HorizontalAlignment" Value="Center" />
@@ -48,9 +48,9 @@
4848
<DataTemplate>
4949
<Border
5050
BorderBrush="{DynamicResource {x:Static styles:VsBrushes.StartPageTextSubHeadingSelectedKey}}"
51-
BorderThickness="0,0,1,0"
52-
Margin="-6,-3,-6,-3">
53-
<StackPanel Margin="6,2,6,2" VerticalAlignment="Center">
51+
BorderThickness="0 0 1 0"
52+
Margin="-6 -3 -6 -3">
53+
<StackPanel Margin="6 2 6 2" VerticalAlignment="Center">
5454
<ComboBox SelectedItem="{Binding Kind, Mode=TwoWay}" ItemsSource="{Binding KindArray}" />
5555
</StackPanel>
5656
</Border>
@@ -71,9 +71,9 @@
7171
<DataTemplate>
7272
<Border
7373
BorderBrush="{DynamicResource {x:Static styles:VsBrushes.StartPageTextSubHeadingSelectedKey}}"
74-
BorderThickness="0,0,1,0"
75-
Margin="-6,-3,-6,-3">
76-
<StackPanel Margin="6,2,6,2" VerticalAlignment="Center">
74+
BorderThickness="0 0 1 0"
75+
Margin="-6 -3 -6 -3">
76+
<StackPanel Margin="6 2 6 2" VerticalAlignment="Center">
7777
<CheckBox
7878
IsThreeState="True"
7979
IsChecked="{Binding IsEmpty}"
@@ -127,11 +127,11 @@
127127
</ListView.View>
128128
</ListView>
129129

130-
<StackPanel Grid.Row="1" Margin="0,5,0,0" Orientation="Horizontal">
130+
<StackPanel Grid.Row="1" Margin="0 5 0 0" Orientation="Horizontal">
131131
<Button
132132
Command="{Binding Path=AddFilterCommand}"
133133
ToolTip="Add filter"
134-
Margin="0,0,4,0">
134+
Margin="0 0 4 0">
135135
<Button.Content>
136136
<vs:Image Source="KnownMonikers.NewFilter" Width="16" Height="16" />
137137
</Button.Content>
@@ -140,7 +140,7 @@
140140
<Button
141141
Command="{Binding Path=DeleteFilterCommand}"
142142
ToolTip="Delete filter"
143-
Margin="0,0,4,0">
143+
Margin="0 0 4 0">
144144
<Button.Content>
145145
<vs:Image Source="KnownMonikers.DeleteFilter" Width="16" Height="16" />
146146
</Button.Content>
@@ -149,7 +149,7 @@
149149
<Button
150150
Command="{Binding Path=MoveFilterUpCommand}"
151151
ToolTip="Move up"
152-
Margin="0,0,4,0">
152+
Margin="0 0 4 0">
153153
<Button.Content>
154154
<vs:Image Source="KnownMonikers.MoveUp" Width="16" Height="16" />
155155
</Button.Content>
@@ -167,7 +167,7 @@
167167
<GroupBox
168168
Grid.Row="2"
169169
Header="Filter help"
170-
Margin="0,5"
170+
Margin="0 5"
171171
Padding="5">
172172
<StackPanel>
173173
<TextBlock>

src/CodeNav.OutOfProc/Dialogs/SettingsDialog/SettingsDialogControl.xaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<DataTemplate.Resources>
88
<Style TargetType="TextBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogTextBoxStyleKey}}" />
99
<Style TargetType="CheckBox" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogCheckBoxStyleKey}}">
10-
<Setter Property="Margin" Value="0,5" />
10+
<Setter Property="Margin" Value="0 5" />
1111
</Style>
1212
<Style TargetType="Label" BasedOn="{StaticResource {x:Static styles:VsResourceKeys.ThemedDialogLabelStyleKey}}">
13-
<Setter Property="Margin" Value="-5,0,0,0" />
13+
<Setter Property="Margin" Value="-5 0 0 0" />
1414
</Style>
1515
</DataTemplate.Resources>
1616

@@ -35,6 +35,10 @@
3535
<CheckBox IsChecked="{Binding ShowToolWindowForUnsupportedFiles, Mode=TwoWay}">
3636
Show the tool window for unsupported files and files without code items
3737
</CheckBox>
38+
39+
<CheckBox IsChecked="{Binding UseCompactMode, Mode=TwoWay}">
40+
Use compact mode with less spacing
41+
</CheckBox>
3842
</StackPanel>
3943
</GroupBox>
4044

src/CodeNav.OutOfProc/Dialogs/SettingsDialog/SettingsDialogData.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,10 @@ public class SettingsDialogData
4646
/// </summary>
4747
[DataMember]
4848
public bool ShowToolWindowForUnsupportedFiles { get; set; } = true;
49+
50+
/// <summary>
51+
/// Setting if CodeNav should use a compact mode with less vertical margins
52+
/// </summary>
53+
[DataMember]
54+
public bool UseCompactMode { get; set; }
4955
}

0 commit comments

Comments
 (0)