Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
471bb25
[WIP] Added a "Give Feedback" dialog box
tombogle Oct 7, 2021
294f9cf
Merge branch 'master' into add-give-feedback-dialog
tombogle Aug 5, 2022
a1a01c4
Cleaned up a few details in response to early code review
tombogle Aug 9, 2022
f07d39b
Made a few localization and layout improvements in GiveFeedbackDlg
tombogle Aug 10, 2022
e54741d
Merge branch 'master' into add-give-feedback-dialog
tombogle Aug 11, 2022
8e70377
Removed errant NotLocalizable
tombogle Aug 11, 2022
385e0e7
Merge branch 'master' into add-give-feedback-dialog
tombogle Aug 16, 2022
bb28cb8
[WIP] Added GiveFeedbackViewModel and began playing with Jira API
tombogle Aug 16, 2022
c99a606
Merge branch 'master' into add-give-feedback-dialog
tombogle Aug 30, 2022
2e9fdbc
Merge branch 'master' into add-give-feedback-dialog
tombogle Jan 24, 2023
ee48ac0
Merge branch 'master' into add-give-feedback-dialog
tombogle Oct 18, 2023
116dd79
Merge branch 'master' into add-give-feedback-dialog
tombogle Oct 31, 2023
d0a30da
Merge branch 'master' into add-give-feedback-dialog
tombogle Jan 4, 2024
f7c5a5b
Merge branch 'master' into add-give-feedback-dialog
tombogle Jan 9, 2024
4543896
Merge branch 'master' into add-give-feedback-dialog
tombogle Apr 10, 2024
65c99f6
Merge branch 'master' into add-give-feedback-dialog
tombogle Apr 23, 2024
e3f5073
Merge branch 'master' into add-give-feedback-dialog
tombogle Jun 7, 2024
a17f4f2
Merge branch 'master' into add-give-feedback-dialog
tombogle Oct 2, 2024
b481fc7
Merge branch 'master' into add-give-feedback-dialog
tombogle Jan 17, 2025
ba86c8a
Merge branch 'master' into add-give-feedback-dialog
tombogle Jan 21, 2025
0f496fa
Merge branch 'master' into add-give-feedback-dialog
tombogle Feb 5, 2025
52d1afd
Added infor to ReleaseNotes.md and automated date/version stamping
tombogle Feb 10, 2025
7ef7d37
Merge branch 'master' into add-give-feedback-dialog
tombogle Feb 10, 2025
01f1927
Merge branch 'master' into add-give-feedback-dialog
tombogle Feb 11, 2025
eeb61fe
Merge branch 'master' into add-give-feedback-dialog
tombogle Feb 12, 2025
0564197
Split off Feedback feature into separate (upcoming) release in releas…
tombogle Feb 12, 2025
dee7046
Added some initial diagnostic info about the product version and buil…
tombogle Feb 12, 2025
f25c25c
Merge branch 'master' into add-give-feedback-dialog
tombogle Feb 26, 2025
31edba3
Merge branch 'master' into add-give-feedback-dialog
tombogle Mar 10, 2025
2b245b7
Merge branch 'master' into add-give-feedback-dialog
tombogle Mar 24, 2025
184eae2
Merge branch 'master' into add-give-feedback-dialog
tombogle Apr 21, 2025
4aad81d
Merge branch 'master' into add-give-feedback-dialog
tombogle Aug 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DistFiles/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ the recorded files to that format, if necessary.
## _VERSION_ (_DATE_)
- Improvements related to opening a clip for editing in an external program.
- Updated localizations.
- Added Give Feedback capability

## 3.5.3 (March 2025)
- Fixed bug affecting Glyssenscript projects when extra clips are present.
Expand Down
1 change: 1 addition & 0 deletions HearThis.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LCS/@EntryIndexedValue">LCS</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MVP/@EntryIndexedValue">MVP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OT/@EntryIndexedValue">OT</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RTF/@EntryIndexedValue">RTF</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=TOC/@EntryIndexedValue">TOC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UDP/@EntryIndexedValue">UDP</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UI/@EntryIndexedValue">UI</s:String>
Expand Down
188 changes: 188 additions & 0 deletions src/HearThis/GiveFeedbackViewModel.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
using System.Windows.Forms;
using System.Diagnostics;

namespace HearThis
{
public enum TypeOfFeedback
{
Problem = 0,
Suggestion = 1,
Appreciation = 2,
Donate = 3
}

public enum ProblemSeverity
{
LostData,
Blocker,
Major,
Minor
}

public enum Area
{
NotApplicable,
DataSharing,
Exporting,
Android,
Installation,
Localization,
Multiple,
Navigation,
Other,
Playback,
ProjectAdministration,
ProjectSelection,
Recording,
Settings,
Website,
Unknown
}

public class GiveFeedbackViewModel
{
public string Title { get; set; }
public TypeOfFeedback Type { get; set; }
public ProblemSeverity Severity { get; set; }
public string DescriptionAsRTF { get; set; }
public Area AffectedArea { get; set; }
public string AffectedProject { get; set; }
public string WebsiteUrl { get; set; }
public Form MainForm { get; }
public string PathToLastClip { get; }
public string MainFormWindowTitle => MainForm.Text;
public bool IncludeScreenShot { get; set; }
public bool IncludeLastClip { get; set; }
public bool IncludeLogFile { get; set; }

public GiveFeedbackViewModel(Form mainForm, string pathToLastClip)
{
MainForm = mainForm;
PathToLastClip = pathToLastClip;
}

public void GoToCommunitySite()
{
Process.Start($"https://{Program.kSupportUrlSansHttps}");
}

public void IssueFeedback()
{
switch (Type)
{
case TypeOfFeedback.Problem:
if (ReportProblemViaRestApi())
return;
break;

case TypeOfFeedback.Donate:
Process.Start("https://donate.givedirect.org/?cid=13536&n=289");
break;
}
}

private byte[] Screenshot()
{
return null;
}

private bool ReportProblemViaRestApi()
{
// https://www.educative.io/answers/how-to-create-a-json-string-in-c-sharp
// https://docs.atlassian.com/software/jira/docs/api/REST/8.22.6/#issue-getEditIssueMeta
// https://jira.sil.org/rest/api/latest/issue/createmeta/HT/issuetypes
return false;
}
}

// Root myDeserializedClass = JsonConvert.DeserializeObject<Root>(myJsonResponse);

public class Component
{
public string id { get; set; }
}

public class Content
{
public string type { get; set; }
public List<Content> content { get; set; }
public string text { get; set; }
}

public class Description
{
public string type { get; set; }
public int version { get; set; }
public List<Content> content { get; set; }
}

public class SystemEnvironment
{
public string type { get; set; }
public int version { get; set; }
public List<Content> content { get; set; }
}

public class Fields
{
public string summary { get; set; }
public Issuetype issuetype { get; set; }
public List<Component> components { get; set; }
public JiraProject project { get; set; }
public Description description { get; set; }
public Reporter reporter { get; set; }
public Priority priority { get; set; }
public List<string> labels { get; set; }
public Security security { get; set; }
public SystemEnvironment environment { get; set; }
public List<HtVersion> versions { get; set; }
}

public class Issuetype
{
[JsonPropertyName("id")]
public string Id { get; set; }
}

public class Priority
{
[JsonPropertyName("id")]
public string Id { get; set; }
}

public class JiraProject
{
[JsonPropertyName("id")]
public string Id => "HT";
}

public class Reporter
{
[JsonPropertyName("id")]
public string Id { get; set; }
}

public class Root
{
public Update update { get; set; }
public Fields fields { get; set; }
}

public class Security
{
[JsonPropertyName("id")]
public string Id { get; set; }
}

public class Update
{
}

public class HtVersion
{
[JsonPropertyName("id")]
public string Id { get; set; }
}
}
12 changes: 4 additions & 8 deletions src/HearThis/HearThis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>HearThis</RootNamespace>
<AssemblyName>HearThis</AssemblyName>
<TargetFramework>NET472</TargetFramework>
<TargetFramework>net472</TargetFramework>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<FileAlignment>512</FileAlignment>
<ApplicationIcon>UI\HearThis.ico</ApplicationIcon>
Expand Down Expand Up @@ -181,6 +181,9 @@
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Update="UI\GiveFeedbackDlg.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
Expand All @@ -193,13 +196,6 @@
<_Parameter1>HearThisTests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
Expand Down
10 changes: 10 additions & 0 deletions src/HearThis/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ private static void Main(string[] args)

SetUpErrorHandling();
Logger.Init();
LogProductInfo();
SettingsProtectionSingleton.ProductSupportUrl = kSupportUrlSansHttps;
SetupLocalization();

Expand Down Expand Up @@ -294,6 +295,15 @@ private static void Main(string[] args)
}
}

private static void LogProductInfo()
{
var asm = Assembly.GetExecutingAssembly();
var ver = asm.GetName().Version;
var file = asm.CodeBase.Replace("file:", string.Empty).TrimStart('/');
var date = new FileInfo(file).LastWriteTime.ToString("dd-MMM-yyyy");
Logger.WriteEvent($"{kProduct} version {ver} Built on {date}");
}

public static bool RestartedToChangeColorScheme { get; private set; }

public static IEnumerable<ErrorMessageInfo> CompatibleParatextProjectLoadErrors => ScrTextCollection.ErrorMessages.Where(e => e.ProjecType != ProjectType.Resource && !e.ProjecType.IsNoteType());
Expand Down
3 changes: 3 additions & 0 deletions src/HearThis/Script/Project.cs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ public IScrProjectSettings ScrProjectSettings
public int TotalCountOfBlocksAndExtraClipsForChapter =>
LineCountForChapter + ExtraRecordings.Count;

public string PathToLastClipRecorded { get; private set; }

public bool HasRecordedClip(int line)
{
if (line >= LineCountForChapter)
Expand Down Expand Up @@ -713,6 +715,7 @@ private List<ScriptLine> GetRecordableBlocksUpThroughHole(IEnumerable<int> indic
public void HandleSoundFileCreated()
{
var clipPath = GetPathToRecordingForSelectedLine();
PathToLastClipRecorded = clipPath;
// Getting this into a local variable is not only more efficient, it also
// prevents an annoying problem when working with the sample project, whereby
// re-getting the current script line loses information that has not yet been saved.
Expand Down
Loading