Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Application Configuration #197

Merged
merged 35 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c4f4f25
WIP
csharpfritz Sep 7, 2023
255bffe
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 7, 2023
c29851c
Added ApplicationConfiguration as a configuration provider
csharpfritz Sep 7, 2023
bf224be
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 12, 2023
835ac00
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 12, 2023
068b4c7
Merge branch 'feature_UiCustomization' of github.com:csharpfritz/Tagz…
csharpfritz Sep 12, 2023
1b21ea9
WIP
csharpfritz Sep 12, 2023
f3b48ff
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 12, 2023
6a47ad1
Moved ApplicationConfiguration to TagzAppContext
csharpfritz Sep 12, 2023
d877bff
Started saving and updating UI configuration
csharpfritz Sep 12, 2023
5f61422
Implemented the Waterfall configuration options
csharpfritz Sep 12, 2023
985d1a5
Added Markdig
csharpfritz Sep 12, 2023
cdd1e13
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 13, 2023
325b2dd
Applying formatting changes through GitHub Actions
github-actions[bot] Sep 13, 2023
fc4f3d3
Added SimpleMDE for editing the waterfall header
csharpfritz Sep 15, 2023
e77333d
Merge branch 'feature_UiCustomization' of github.com:csharpfritz/Tagz…
csharpfritz Sep 16, 2023
6d2a741
Applying formatting changes through GitHub Actions
github-actions[bot] Sep 16, 2023
bac30f9
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 17, 2023
27bc285
Applying formatting changes through GitHub Actions
github-actions[bot] Sep 17, 2023
74cacd0
Formatted .NETcode
csharpfritz Sep 17, 2023
58befa6
Applying formatting changes through GitHub Actions
github-actions[bot] Sep 17, 2023
c369321
Fixed bad merge
csharpfritz Sep 17, 2023
a06af2c
Merge branch 'feature_UiCustomization' of github.com:csharpfritz/Tagz…
csharpfritz Sep 17, 2023
01a6409
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 17, 2023
502a502
Updated with .NET 8 config for launchSettings
csharpfritz Sep 17, 2023
d129f11
Merge branch 'main' into feature_UiCustomization
csharpfritz Sep 17, 2023
75042bd
Fixed missing reference
csharpfritz Sep 17, 2023
8c13a29
Force waterfallHeaderCSS rules
csharpfritz Sep 17, 2023
bd5ead8
Applying formatting changes through GitHub Actions
github-actions[bot] Sep 17, 2023
d2c2459
Moved connectionstrings for development to appsettings.development an…
csharpfritz Sep 17, 2023
5206f5b
Cleaned up header on MDE
csharpfritz Sep 18, 2023
5f554a3
Merge branch 'feature_UiCustomization' of github.com:csharpfritz/Tagz…
csharpfritz Sep 18, 2023
4f1e6a9
Applying formatting changes through GitHub Actions
github-actions[bot] Sep 18, 2023
961f198
Completed move to Test environment for Playwright tests
csharpfritz Sep 18, 2023
116d965
Merge branch 'feature_UiCustomization' of github.com:csharpfritz/Tagz…
csharpfritz Sep 18, 2023
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
8 changes: 8 additions & 0 deletions src/TagzApp.Common/IApplicationConfigurationRepository.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Ignore Spelling: Css

namespace TagzApp.Common;

public interface IApplicationConfigurationRepository
{
Task SetValues(ApplicationConfiguration config);
}
18 changes: 8 additions & 10 deletions src/TagzApp.Common/IContentSubscriber.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using TagzApp.Common.Models;

namespace TagzApp.Common;

public interface IContentSubscriber
{

void SubscribeToContent(Hashtag tag, Action<Content> onNewContent);

}
namespace TagzApp.Common;

public interface IContentSubscriber
{

void SubscribeToContent(Hashtag tag, Action<Content> onNewContent);

}
15 changes: 8 additions & 7 deletions src/TagzApp.Common/IHasNewestId.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
namespace TagzApp.Common;

public interface IHasNewestId {

string NewestId { get; set; }

}
namespace TagzApp.Common;

public interface IHasNewestId
{

string NewestId { get; set; }

}
46 changes: 23 additions & 23 deletions src/TagzApp.Common/IMessagingService.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
using Microsoft.Extensions.Hosting;

namespace TagzApp.Web.Services;

public interface IMessagingService : IHostedService
{
IEnumerable<string> TagsTracked { get; }

Task AddHashtagToWatch(string tag);

Task<Content?> GetContentByIds(string provider, string providerId);

Task<IEnumerable<Content>> GetExistingContentForTag(string tag);
// TODO: Needs checking if a non-nullable ModerationAction makes problems!
Task<IEnumerable<(Content, ModerationAction)>> GetContentByTagForModeration(string tag);

Task<IEnumerable<Content>> GetApprovedContentByTag(string tag);

IEnumerable<ISocialMediaProvider> Providers { get; }

string GetLatestProviderIdByTagAndProvider(string tag, string provider);

}
using Microsoft.Extensions.Hosting;
namespace TagzApp.Web.Services;
public interface IMessagingService : IHostedService
{
IEnumerable<string> TagsTracked { get; }
Task AddHashtagToWatch(string tag);
Task<Content?> GetContentByIds(string provider, string providerId);
Task<IEnumerable<Content>> GetExistingContentForTag(string tag);
// TODO: Needs checking if a non-nullable ModerationAction makes problems!
Task<IEnumerable<(Content, ModerationAction)>> GetContentByTagForModeration(string tag);
Task<IEnumerable<Content>> GetApprovedContentByTag(string tag);
IEnumerable<ISocialMediaProvider> Providers { get; }
string GetLatestProviderIdByTagAndProvider(string tag, string provider);
}
24 changes: 11 additions & 13 deletions src/TagzApp.Common/INotifyNewMessages.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
using TagzApp.Common.Models;

namespace TagzApp.Web.Services;

public interface INotifyNewMessages
{
void NotifyNewContent(string hashtag, Content content);

void NotifyApprovedContent(string hashtag, Content content, ModerationAction action);

void NotifyRejectedContent(string hashtag, Content content, ModerationAction action);

}
namespace TagzApp.Web.Services;

public interface INotifyNewMessages
{
void NotifyNewContent(string hashtag, Content content);

void NotifyApprovedContent(string hashtag, Content content, ModerationAction action);

void NotifyRejectedContent(string hashtag, Content content, ModerationAction action);

}
66 changes: 32 additions & 34 deletions src/TagzApp.Common/ISocialMediaProvider.cs
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
using TagzApp.Common.Models;

namespace TagzApp.Common;

/// <summary>
/// Defines the interface for a Social Media Provider that delivers content to TagzApp
/// </summary>
public interface ISocialMediaProvider
{

/// <summary>
/// Unique identifier for the provider
/// </summary>
string Id { get; }

/// <summary>
/// Display name for the provider
/// </summary>
string DisplayName { get; }

/// <summary>
/// How frequently new content should be retrieved from the provider
/// </summary>
TimeSpan NewContentRetrievalFrequency { get; }

/// <summary>
/// Get a collection of content for a given hashtag
/// </summary>
/// <param name="tag">Tag to search for</param>
/// <param name="since">Datestamp to search for content since</param>
/// <returns></returns>
Task<IEnumerable<Content>> GetContentForHashtag(Hashtag tag, DateTimeOffset since);

}
namespace TagzApp.Common;

/// <summary>
/// Defines the interface for a Social Media Provider that delivers content to TagzApp
/// </summary>
public interface ISocialMediaProvider
{

/// <summary>
/// Unique identifier for the provider
/// </summary>
string Id { get; }

/// <summary>
/// Display name for the provider
/// </summary>
string DisplayName { get; }

/// <summary>
/// How frequently new content should be retrieved from the provider
/// </summary>
TimeSpan NewContentRetrievalFrequency { get; }

/// <summary>
/// Get a collection of content for a given hashtag
/// </summary>
/// <param name="tag">Tag to search for</param>
/// <param name="since">Datestamp to search for content since</param>
/// <returns></returns>
Task<IEnumerable<Content>> GetContentForHashtag(Hashtag tag, DateTimeOffset since);

}
Loading
Loading