Skip to content

Commit

Permalink
Merge pull request #60 from unsignedapps/doc-update
Browse files Browse the repository at this point in the history
Updated docs
  • Loading branch information
bok- authored Oct 4, 2020
2 parents 7f3e097 + ba1f1e8 commit db60fb1
Show file tree
Hide file tree
Showing 7 changed files with 179 additions and 57 deletions.
11 changes: 8 additions & 3 deletions docs/api/flaggroup/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ <h2 id="inheritance">Inheritance <a href="#inheritance" class="permalink">¶</a>
<hr />

<h2 id="initializers">Initializers <a href="#initializers" class="permalink"></a></h2>
<h3 id="initnamecodingkeystrategydescription"><code>init(name:​codingKeyStrategy:​description:​)</code> <a href="#initnamecodingkeystrategydescription" class="permalink"></a></h3><p>Initialises a new <code>FlagGroup</code> with the supplied info</p>
<div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="kd">public</span> <span class="kd">init</span><span class="p">(</span><span class="n">name</span><span class="p">:</span><span class="err"></span> <span class="nb">String</span><span class="p">?</span> <span class="p">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="n">codingKeyStrategy</span><span class="p">:</span><span class="err"></span> <span class="n">CodingKeyStrategy</span> <span class="p">=</span> <span class="p">.</span><span class="k">default</span><span class="p">,</span> <span class="n">description</span><span class="p">:</span><span class="err"></span> <span class="n">FlagInfo</span><span class="p">)</span>
<h3 id="initnamecodingkeystrategydescriptiondisplay"><code>init(name:​codingKeyStrategy:​description:​display:​)</code> <a href="#initnamecodingkeystrategydescriptiondisplay" class="permalink"></a></h3><p>Initialises a new <code>FlagGroup</code> with the supplied info</p>
<div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="kd">public</span> <span class="kd">init</span><span class="p">(</span><span class="n">name</span><span class="p">:</span><span class="err"></span> <span class="nb">String</span><span class="p">?</span> <span class="p">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="n">codingKeyStrategy</span><span class="p">:</span><span class="err"></span> <span class="n">CodingKeyStrategy</span> <span class="p">=</span> <span class="p">.</span><span class="k">default</span><span class="p">,</span> <span class="n">description</span><span class="p">:</span><span class="err"></span> <span class="n">FlagInfo</span><span class="p">,</span> <span class="n">display</span><span class="p">:</span><span class="err"></span> <span class="n">Display</span> <span class="p">=</span> <span class="p">.</span><span class="n">navigation</span><span class="p">)</span>
</code></pre></div><div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="p">@</span><span class="n">FlagGroup</span><span class="p">(</span><span class="n">description</span><span class="p">:</span><span class="err"></span> <span class="s">&#34;This is a test flag group. Isn&#39;t it grand?&#34;</span>
<span class="kd">var</span> <span class="nv">myFlagGroup</span><span class="p">:</span><span class="err"></span> <span class="n">MyFlags</span>
</code></pre></div>
<h4 id="parameters">Parameters <a href="#parameters" class="permalink"></a></h4><ul>
<li>name:​ - name:​ An optional display name to give the group. Only visible in flag editors like Vexillographer. Default is to calculate one based on the property name.</li>
<li>codingKeyStragey:​ - codingKeyStragey:​ An optional strategy to use when calculating the key name for this group. The default is to use the <code>FlagPole</code>s strategy.</li>
<li>description:​ - description:​ A description of this flag group. Used in flag editors like Vexillographer and also for future developer context. You can also specify <code>.hidden</code> to hide this flag group from Vexillographer.</li>
<li>display:​ - display:​ Whether we should display this FlagGroup as using a <code>NavigationLink</code> or as a <code>Section</code> in Vexillographer</li>
</ul>

<hr />
Expand All @@ -72,6 +73,9 @@ <h3 id="info"><code>info</code> <a href="#info" class="permalink">¶</a></h3><p>
</code></pre></div>
<h3 id="wrappedvalue"><code>wrappedValue</code> <a href="#wrappedvalue" class="permalink"></a></h3><p>The <code>FlagContainer</code> being wrapped.</p>
<div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="kd">var</span> <span class="nv">wrappedValue</span><span class="p">:</span><span class="err"></span> <span class="n">Group</span>
</code></pre></div>
<h3 id="display"><code>display</code> <a href="#display" class="permalink"></a></h3><p>How we should display this group in Vexillographer</p>
<div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="kd">let</span> <span class="nv">display</span><span class="p">:</span><span class="err"></span> <span class="n">Display</span>
</code></pre></div>
</article>
</main>
Expand All @@ -85,14 +89,15 @@ <h2>On This Page</h2>
<li><a href="#inheritance">Inheritance</a></li>
<li><a href="#initializers">Initializers</a>
<ul>
<li><a href="#initnamecodingkeystrategydescription"><code>init(name:​codingKeyStrategy:​description:​)</code></a></li>
<li><a href="#initnamecodingkeystrategydescriptiondisplay"><code>init(name:​codingKeyStrategy:​description:​display:​)</code></a></li>
</ul>
</li>
<li><a href="#properties">Properties</a>
<ul>
<li><a href="#id"><code>id</code></a></li>
<li><a href="#info"><code>info</code></a></li>
<li><a href="#wrappedvalue"><code>wrappedValue</code></a></li>
<li><a href="#display"><code>display</code></a></li>
</ul>
</li>
</ul>
Expand Down
84 changes: 84 additions & 0 deletions docs/api/flaggroup_display/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">

<title>Vexil - FlagGroup.Display</title>

<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<meta name="author" content="">
<meta name="description" content="">

<link rel="stylesheet" href="https://unsignedapps.github.io/Vexil/bootstrap.min.css">
<link rel="stylesheet" href="https://unsignedapps.github.io/Vexil/style.css">
<link rel="stylesheet" href="https://unsignedapps.github.io/Vexil/syntax.css">
<script type="text/javascript" src="https://unsignedapps.github.io/Vexil/boottrap.min.js"></script>

</head>
<body>
<div class="container">
<header id="header">
<nav class="navbar navbar-expand navbar-light">
<a href="https://unsignedapps.github.io/Vexil" class="navbar-brand">
<img src="https://unsignedapps.github.io/Vexil/vexil-logo.png" alt="Vexil logo">
Vexil
</a>
<ul class="navbar-nav">
<li class="nav-item"><a class="nav-link" href="https://unsignedapps.github.io/Vexil/api">APIs</a></li>
<li class="nav-item"><a class="nav-link" href="https://unsignedapps.github.io/Vexil/guides">Guides</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/unsignedapps/Vexil/">GitHub</a></li>
</ul>
</nav>
</header>
<div class="row">
<div class="col-12 col-md-9">

<main>
<article>
<h1>FlagGroup.Display</h1>

<p>How to display this group in Vexillographer</p>
<div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="kd">enum</span> <span class="nc">Display</span>
</code></pre></div>
<hr />

<h2 id="enumeration-cases">Enumeration Cases <a href="#enumeration-cases" class="permalink"></a></h2>
<h3 id="navigation"><code>navigation</code> <a href="#navigation" class="permalink"></a></h3><p>Displays this group using a <code>NavigationLink</code>. This is the default.</p>
<div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="k">case</span> <span class="n">navigation</span>
</code></pre></div><p>In the navigated view the <code>name</code> is the cell&rsquo;s display name and the navigated view&rsquo;s
title, and the <code>description</code> is displayed at the top of the navigated view.</p>

<h3 id="section"><code>section</code> <a href="#section" class="permalink"></a></h3><p>Displays this group using a <code>Section</code></p>
<div class="highlight"><pre class="chroma"><code class="language-swift" data-lang="swift"><span class="k">case</span> <span class="n">section</span>
</code></pre></div><p>The <code>name</code> of this FlagGroup is used as the Section&rsquo;s header, and the <code>description</code>
as the Section&rsquo;s footer.</p>

</article>
</main>

</div>

<div class="col-3 sidebar d-none d-md-block">
<h2>On This Page</h2>
<nav id="TableOfContents">
<ul>
<li><a href="#enumeration-cases">Enumeration Cases</a>
<ul>
<li><a href="#navigation"><code>navigation</code></a></li>
<li><a href="#section"><code>section</code></a></li>
</ul>
</li>
</ul>
</nav>
</div>

</div>
<footer id="footer">
<div class="copyright">
<small>Copyright © 2020 Unsigned Apps Pty Ltd.</small><br />
<small>API docs are generated using <a href="https://github.com/SwiftDocOrg/swift-doc" target="_blank">swift-doc</a>. The theme is also from there.</small>
</div>
</footer>
</div>
</body>
</html>
49 changes: 31 additions & 18 deletions docs/api/index.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<description>Recent content on Vexil</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Wed, 19 Aug 2020 00:00:00 +0000</lastBuildDate>
<lastBuildDate>Sun, 04 Oct 2020 00:00:00 +0000</lastBuildDate>

<atom:link href="https://unsignedapps.github.io/Vexil/api/index.xml" rel="self" type="application/rss+xml" />


<item>
<title>BoxedFlagValue</title>
<link>https://unsignedapps.github.io/Vexil/api/boxedflagvalue/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/boxedflagvalue/</guid>
<description>An intermediate type used to make encoding and decoding of types simpler for FlagValueSources
Expand All @@ -26,7 +26,7 @@ Enumeration Cases ¶ array ¶case array(:​ [BoxedFlagValue]) bool ¶case bool
<item>
<title>Flag</title>
<link>https://unsignedapps.github.io/Vexil/api/flag/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flag/</guid>
<description>A wrapper representing a Feature Flag / Feature Toggle.
Expand All @@ -37,7 +37,7 @@ The type that you wrap with @Flag must conform to FlagValue.</description>
<item>
<title>Flag.CodingKeyStrategy</title>
<link>https://unsignedapps.github.io/Vexil/api/flag_codingkeystrategy/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flag_codingkeystrategy/</guid>
<description>An enumeration describing how the key should be calculated for this specific Flag.
Expand All @@ -50,7 +50,7 @@ case snakecase customKey ¶Manually specifies the key name for this Flag.</desc
<item>
<title>FlagContainer</title>
<link>https://unsignedapps.github.io/Vexil/api/flagcontainer/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flagcontainer/</guid>
<description>A FlagContainer is a type that encapsulates your Flag and FlagGroup types. The only requirement of a FlagContainer is that it can be initialised with an empty init().
Expand All @@ -60,7 +60,7 @@ public protocol FlagContainer </description>
<item>
<title>FlagDisplayValue</title>
<link>https://unsignedapps.github.io/Vexil/api/flagdisplayvalue/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flagdisplayvalue/</guid>
<description>A convenience protocol used by flag editors like Vexillographer.
Expand All @@ -72,20 +72,20 @@ var flagDisplayValue:​ String </description>
<item>
<title>FlagGroup</title>
<link>https://unsignedapps.github.io/Vexil/api/flaggroup/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flaggroup/</guid>
<description>A wrapper representing a group of Feature Flags / Feature Toggles.
@propertyWrapper public struct FlagGroup&amp;lt;Group&amp;gt;:​ Decorated, Identifiable where Group:​ FlagContainer Use this to structure your flags into a tree. You can nest FlagGroups as deep as you need to and can split them across multiple files for maintainability.
The type that you wrap with FlagGroup must conform to FlagContainer.
Inheritance ¶Decorated, Identifiable
Initializers ¶ init(name:​codingKeyStrategy:​description:​) ¶Initialises a new FlagGroup with the supplied info</description>
Initializers ¶ init(name:​codingKeyStrategy:​description:​display:​) ¶Initialises a new FlagGroup with the supplied info</description>
</item>

<item>
<title>FlagGroup.CodingKeyStrategy</title>
<link>https://unsignedapps.github.io/Vexil/api/flaggroup_codingkeystrategy/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flaggroup_codingkeystrategy/</guid>
<description>An enumeration describing how the key should be calculated for this specific FlagGroup.
Expand All @@ -95,10 +95,23 @@ case kebabcase snakecase ¶Converts the property name into a snake_case string.
case snakecase skip ¶Skips this FlagGroup from the key generation</description>
</item>

<item>
<title>FlagGroup.Display</title>
<link>https://unsignedapps.github.io/Vexil/api/flaggroup_display/</link>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flaggroup_display/</guid>
<description>How to display this group in Vexillographer
enum Display Enumeration Cases ¶ navigation ¶Displays this group using a NavigationLink. This is the default.
case navigation In the navigated view the name is the cell&amp;rsquo;s display name and the navigated view&amp;rsquo;s title, and the description is displayed at the top of the navigated view.
section ¶Displays this group using a Section
case section The name of this FlagGroup is used as the Section&amp;rsquo;s header, and the description as the Section&amp;rsquo;s footer.</description>
</item>

<item>
<title>FlagInfo</title>
<link>https://unsignedapps.github.io/Vexil/api/flaginfo/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flaginfo/</guid>
<description>A simple collection of information about a Flag or FlagGroup
Expand All @@ -111,7 +124,7 @@ public init(description:​ String) Parameters ¶ description:​ - description
<item>
<title>FlagPole</title>
<link>https://unsignedapps.github.io/Vexil/api/flagpole/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flagpole/</guid>
<description>A FlagPole hoists a group of feature flags / feature toggles.
Expand All @@ -123,7 +136,7 @@ struct MyFlags:​ FlagContainer { // ... } let flagPpole = FlagPole(hoist:​ M
<item>
<title>FlagValue</title>
<link>https://unsignedapps.github.io/Vexil/api/flagvalue/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flagvalue/</guid>
<description>A type that represents the wrapped value of a Flag
Expand All @@ -135,7 +148,7 @@ Requirements ¶ boxedFlagValue ¶Your conforming type must return an instance of
<item>
<title>FlagValueDictionary</title>
<link>https://unsignedapps.github.io/Vexil/api/flagvaluedictionary/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flagvaluedictionary/</guid>
<description>A simple dictionary-backed FlagValueSource that can be useful for testing and other purposes.
Expand All @@ -148,7 +161,7 @@ public init(_ dictionary:​ DictionaryType = [:​]) init(dictionaryLiteral:
<item>
<title>FlagValueSource</title>
<link>https://unsignedapps.github.io/Vexil/api/flagvaluesource/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/flagvaluesource/</guid>
<description>A simple protocol that describes a source of FlagValues
Expand All @@ -161,7 +174,7 @@ func flagValue&amp;lt;Value&amp;gt;(key:​ String) -&amp;gt; Value? where Value
<item>
<title>MutableFlagGroup</title>
<link>https://unsignedapps.github.io/Vexil/api/mutableflaggroup/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/mutableflaggroup/</guid>
<description>A MutableFlagGroup is a wrapper type that provides a &amp;ldquo;setter&amp;rdquo; for each contained Flag.
Expand All @@ -171,7 +184,7 @@ func flagValue&amp;lt;Value&amp;gt;(key:​ String) -&amp;gt; Value? where Value
<item>
<title>Snapshot</title>
<link>https://unsignedapps.github.io/Vexil/api/snapshot/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/snapshot/</guid>
<description>A Snapshot serves multiple purposes in Vexil. It is a point-in-time container of flag values, and is also mutable and can be applied / saved to a FlagValueSource.
Expand All @@ -183,7 +196,7 @@ You create snapshots using a FlagPole:​
<item>
<title>VexilConfiguration</title>
<link>https://unsignedapps.github.io/Vexil/api/vexilconfiguration/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/vexilconfiguration/</guid>
<description>A configuration struct passed into the FlagPole to configure it.
Expand All @@ -194,7 +207,7 @@ public init(codingPathStrategy:​ VexilConfiguration.CodingKeyStrategy = .defau
<item>
<title>VexilConfiguration.CodingKeyStrategy</title>
<link>https://unsignedapps.github.io/Vexil/api/vexilconfiguration_codingkeystrategy/</link>
<pubDate>Wed, 19 Aug 2020 00:00:00 +0000</pubDate>
<pubDate>Sun, 04 Oct 2020 00:00:00 +0000</pubDate>

<guid>https://unsignedapps.github.io/Vexil/api/vexilconfiguration_codingkeystrategy/</guid>
<description>An enumeration describing how keys should be calculated by Flag and FlagGroups.
Expand Down
Loading

0 comments on commit db60fb1

Please sign in to comment.