Skip to content

Commit

Permalink
docs: add contributors to the app (closes #296)
Browse files Browse the repository at this point in the history
Also better present the third-party libraries, with links and less noise from the licenses text
  • Loading branch information
lwouis committed Jul 10, 2020
1 parent 9596157 commit 1199013
Show file tree
Hide file tree
Showing 10 changed files with 179 additions and 621 deletions.
4 changes: 0 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ target 'alt-tab-macos' do
pod 'ShortcutRecorder', :git => 'https://github.com/Kentzo/ShortcutRecorder.git', :commit => 'f718220854575bad86fa89dd2bb3decd0b14b2b0'
pod 'SwiftyMarkdown', '1.1.0'
pod 'Preferences', '1.0.1'

post_install do |installer|
system('scripts/update_acknowledgments.sh')
end
end
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ SPEC CHECKSUMS:
Sparkle: ea073ba9c69cee3ebaab8685ba1e732e14d249f7
SwiftyMarkdown: 033abc9dad9a37903f81aec5188cade436f40520

PODFILE CHECKSUM: e7011f43849744a924e7df7735fb8dfabeb15628
PODFILE CHECKSUM: ccd8822c0e64188b9aaf554188c72ef13a7c81f4

COCOAPODS: 1.9.1
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

276 changes: 138 additions & 138 deletions Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions alt-tab-macos.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
D04BA4575B13F1A148C108E2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BA459B8804ABFBDA50663 /* InfoPlist.strings */; };
D04BA48B00B4211A465C7337 /* DebugProfile.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BACABD048E62EBE4576CC /* DebugProfile.swift */; };
D04BA4A11F821548EE3C5E95 /* Bash.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA514F1C4B475B3CA6EB6 /* Bash.swift */; };
D04BA530F00E5989D66C6A1F /* Contributors.md in Resources */ = {isa = PBXBuildFile; fileRef = D04BA812B8DCB915B8F4B915 /* Contributors.md */; };
D04BA5863E8AD08C36B52F80 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D04BAC86E60B1B850059BC54 /* Localizable.strings */; };
D04BA6187A91A847844B6ABB /* Window.swift in Sources */ = {isa = PBXBuildFile; fileRef = D04BA015A45DE7AFDC9794FE /* Window.swift */; };
D04BA69012A483201B375D46 /* Acknowledgments.md in Resources */ = {isa = PBXBuildFile; fileRef = D04BAADF01EB8FF8A15AECC6 /* Acknowledgments.md */; };
Expand Down Expand Up @@ -130,7 +131,6 @@
D04BA2E723062A1DAC58618F /* setup_ci_pr.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = setup_ci_pr.sh; sourceTree = "<group>"; };
D04BA2E8D5D5CC23456BC8F7 /* tr */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = tr; path = Localizable.strings; sourceTree = "<group>"; };
D04BA32F25860B686DFE818A /* 3 windows - 1 line.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "3 windows - 1 line.jpg"; sourceTree = "<group>"; };
D04BA332D13755B53E86D550 /* update_acknowledgments.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = update_acknowledgments.sh; sourceTree = "<group>"; };
D04BA3632A2EB5C64A3FEE59 /* hu */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = hu; path = InfoPlist.strings; sourceTree = "<group>"; };
D04BA369B4D9FD6A13936F53 /* bare.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = bare.html; sourceTree = "<group>"; };
D04BA399F1DF2C61FC2C9599 /* menubar-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menubar-icon@2x.png"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -590,7 +590,6 @@
D04BAA5ECAE8BB8F8656DEDF /* update_contributors.sh */,
D04BAD65AA870A49D2F89DBC /* ensure_generated_files_are_up_to_date.sh */,
D04BA4D5DF349429527824A2 /* determine_version.sh */,
D04BA332D13755B53E86D550 /* update_acknowledgments.sh */,
D04BAAE6E6823304D66B74F8 /* update_website.sh */,
D04BA7A758026814667273DC /* convert_iconset_to_icns.sh */,
);
Expand Down Expand Up @@ -929,6 +928,7 @@
D04BAAB5C4E78AE375EA7D3C /* Localizable.strings in Resources */,
D04BAC463D66BB8E19CF8E2E /* InfoPlist.strings in Resources */,
D04BA7B9421871EDBD58F4E3 /* Localizable.strings in Resources */,
D04BA530F00E5989D66C6A1F /* Contributors.md in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
453 changes: 11 additions & 442 deletions docs/Acknowledgments.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/Contributors.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributors

### They helped [develop the app](https://github.com/lwouis/alt-tab-macos/graphs/contributors):
They helped [develop the app](https://github.com/lwouis/alt-tab-macos/graphs/contributors):

* [adamnemecek](https://github.com/adamnemecek)
* [akx](https://github.com/akx)
Expand All @@ -14,7 +14,7 @@
* [rbnis](https://github.com/rbnis)
* [shaqed](https://github.com/shaqed)

### They helped [localize the app](https://poeditor.com/join/project/8AOEZ0eAZE):
They helped [localize the app](https://poeditor.com/join/project/8AOEZ0eAZE):

* 73
* Aarni Koskela
Expand Down
15 changes: 0 additions & 15 deletions scripts/update_acknowledgments.sh

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/update_contributors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ projectId="316051"
(
echo -e "# Contributors\n"

echo -e "### They helped [develop the app](https://github.com/lwouis/alt-tab-macos/graphs/contributors):\n"
echo -e "They helped [develop the app](https://github.com/lwouis/alt-tab-macos/graphs/contributors):\n"

curl https://api.github.com/repos/lwouis/alt-tab-macos/contributors \
-H "Authorization: token $GITHUB_TOKEN" |
Expand All @@ -17,7 +17,7 @@ projectId="316051"
sort -f |
sed -e 's/^/* /'

echo -e "\n### They helped [localize the app](https://poeditor.com/join/project/8AOEZ0eAZE):\n"
echo -e "\nThey helped [localize the app](https://poeditor.com/join/project/8AOEZ0eAZE):\n"

(
echo -e "lwouis"
Expand Down
36 changes: 22 additions & 14 deletions src/ui/preferences-window/tabs/AcknowledgmentsTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,31 @@ class AcknowledgmentsTab: NSViewController, PreferencePane {
let toolbarItemIcon = NSImage(named: NSImage.userAccountsName)!

override func loadView() {
let markdownFileUrl = Bundle.main.url(forResource: "Acknowledgments", withExtension: "md")!
let md = SwiftyMarkdown(url: markdownFileUrl)!
md.h1.fontSize = 24
md.h2.fontSize = 20
let textView = TextField(md.attributedString())
let textViews: [TextField] = ["Contributors", "Acknowledgments"].map {
let markdownFileUrl = Bundle.main.url(forResource: $0, withExtension: "md")!
let md = SwiftyMarkdown(url: markdownFileUrl)!
md.h1.fontSize = 16
md.underlineLinks = false
md.bullet = ""
let textView = TextField(md.attributedString())
textView.allowsEditingTextAttributes = true
textView.isSelectable = true
return textView
}
let subGrid = GridView([textViews])
subGrid.column(at: 1).leadingPadding = 20
subGrid.fit()

let scrollView = ScrollView()
scrollView.scrollerKnobStyle = .default
scrollView.documentView!.subviews = [textView]
let height = min(textView.fittingSize.width, AcknowledgmentsTab.maxTabHeight)
scrollView.frame.size = NSSize(width: textView.fittingSize.width, height: height)
scrollView.contentView.frame.size = textView.fittingSize
scrollView.documentView!.frame.size = textView.fittingSize
scrollView.fit(textView.fittingSize.width, height)
scrollView.documentView!.subviews = [subGrid]
let totalWidth = subGrid.fittingSize.width
let totalHeight = min(subGrid.fittingSize.height, AcknowledgmentsTab.maxTabHeight)
scrollView.frame.size = NSSize(width: totalWidth, height: totalHeight)
scrollView.contentView.frame.size = scrollView.frame.size
scrollView.documentView!.frame.size = subGrid.fittingSize
scrollView.fit(totalWidth, totalHeight)

let grid = GridView([[scrollView]])
grid.fit()
view = grid
view = scrollView
}
}

0 comments on commit 1199013

Please sign in to comment.