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

Improve UX of browsing through reports #43

Open
eloydegen opened this issue Mar 20, 2024 · 4 comments
Open

Improve UX of browsing through reports #43

eloydegen opened this issue Mar 20, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@eloydegen
Copy link

Hi, thanks for the cool tool! I was looking for something like this, most other projects use way more elaborate dependencies I do not need. It fits my needs quite good :D

Currently it is pretty tedious to browse through all the reports that are put in a subfolder. I do like the idea of using the webserver built-in feature of open directories, but the UX isn't great at the moment. Let me know your thoughts on this!

Possible options:

  • Merging all the pages to a single page.
  • Rename the actual report file to 'index.html' so clicking on a sub-folder makes you enter the report directly. If there are multiple for a single day, they could be merged (maybe as a setting for people who do not want this)
  • Not merge pages, but adding 'next' buttons to report pages so it is easier to browse
  • Something else?
@tierpod
Copy link
Owner

tierpod commented Apr 4, 2024

Thank you for the report.

I would like to improve UX, but on the other hand - keep this project as simple as possible (for my use case, current situation suits very well).

Merging all the pages to a single page.

For now, we use this key for grouping

return fmt.Sprintf("%v!%v!%v", r.ReportMetadata.OrgName, r.ReportMetadata.Email, r.PolicyPublished.Domain)

Maybe we can make group key configurable.

Rename the actual report file to 'index.html' so clicking on a sub-folder makes you enter the report directly. If there are multiple for a single day, they could be merged (maybe as a setting for people who do not want this)

In this case, all reports from different email providers will be merged into one big html file. With current merging logic, we'll lost information about who send us this report (I think it's important). We can implement another logic like "generate all reports not in individual html file each, but in one index.html keeping provider information".

Not merge pages, but adding 'next' buttons to report pages so it is easier to browse

I assume, it's possible by adding new dependency (like database), or writing html template with some javascript: read list of files, and render "next" button, but not sure (I'm not good in JS).

As you can see, there are ways to improve situation, just need some time to experiment and choose more suitable way.

@tierpod tierpod added the enhancement New feature or request label Apr 4, 2024
@eloydegen
Copy link
Author

I assume, it's possible by adding new dependency (like database), or writing html template with some javascript: read list of files, and render "next" button, but not sure (I'm not good in JS).

At the time of rendering the whole thing, it is known in-memory what all the pages are, right? Then it would be possible to add an HTML button on each page, without any need for a database or Javascript.

@moorereason
Copy link
Contributor

Merging all the pages to a single page.

For now, we use this key for grouping

return fmt.Sprintf("%v!%v!%v", r.ReportMetadata.OrgName, r.ReportMetadata.Email, r.PolicyPublished.Domain)

Maybe we can make group key configurable.

I added this feature locally to see what it could do and then got distracted with something else and haven't really tested it out much. Here's the idea:

  1. Create a new merge_key config option.
  2. The merge_key is a Go template string.
  3. The default value is {{ .ReportMetadata.OrgName }}!{{ .ReportMetadata.Email }}!{{ .PolicyPublished.Domain }}.
  4. Render the merge_key for each report and use it to test for equality.

I can submit a PR if you're interested.

Not merge pages, but adding 'next' buttons to report pages so it is easier to browse

I assume, it's possible by adding new dependency (like database), or writing html template with some javascript: read list of files, and render "next" button, but not sure (I'm not good in JS).

As you can see, there are ways to improve situation, just need some time to experiment and choose more suitable way.

One of the things I got distracted with was using dmarc-report-converter to generate data files (JSON) and content files (Markdown with just frontmatter) for use with Hugo (a Go static site generator). I don't know if it's a viable solution or not, but I want to keep playing with it. If it turns into something useful, I'll be sure to share it.

@tierpod
Copy link
Owner

tierpod commented Apr 15, 2024

I can submit a PR if you're interested.

Yes, of course, I'll take a look at it. I had the same idea, but busy at work to play with it.

I don't know if it's a viable solution or not

Why not? Nice idea. I added json output for such cases (integrating with external software), so feel free to experiment with it 👍

moorereason added a commit to moorereason/dmarc-report-converter that referenced this issue Apr 16, 2024
Add a merge_key configuration option to allow for custom merge matching
logic.

Updates tierpod#43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants