hexatlas / lemmy-atlas

GNU Affero General Public License v3.0
1 stars 0 forks source link

User Define Regions: Brainstorming #1

Open hexatlas opened 5 months ago

hexatlas commented 5 months ago

@SleeplessOne1917 Commented that:

"Lemmy doesn't support hashtags, so that's a hurdle."

"Sounds hard to implement without having posters use some agreed upon pre-defined region tags."

SleeplessOne1917 commented 5 months ago

Having played around with the app for a bit (I managed to get it running locally), I can see that associating comments with regions/countries is done by looking for names in the text. This could also be done for, say, hashtags, so Lemmy's lack of hashtag support might not be the biggest deal. Having a consistent way of mapping tags to regions/whatever else is a bigger hurdle.

Another thing I noticed is that the map is very granular, but doesn't currently benefit from that granularity (at least with respect to the comments). A specific region in a country may sometimes have comments related to just that, like Xinjiang PRC for example, but most states/provinces default to only telling information about the wider country it's in (e.g. Haute Matsiatra, Madagascar). Will this granularity be utilized?

hexatlas commented 5 months ago

Thank you for giving the project a look and your help.

Having a consistent way of mapping tags to regions/whatever else is a bigger hurdle.

What do you think about this approach?

User story: UserA selects by clicking regions on the map and setting selectedRegionsArray. Then names the selected regions. Writes comment and posts via Atlas. Later another UserB stumbles on the (highlighted) comment and can click on it. After clicking User B is presented with the region selection from UserA

Implementation: Highlighting selected regions; Easier way of selecting regions, login and posting, Inject/Append Region specific Meta information(selectedRegionsArray) to user comment/post, Update AtlasCommunityComment to check for Meta information and highlight in this format

e.g.

Newsmega_enjoyer1337 to news - 25 - 1 hour ago 

Found this article on event
archive.md/url

::: spoiler HexAtlas

{
   "regionName": "#HashTagCountries420",
   "activeSelectedRegionsArray": "[List, of, Countries]"
}

:::

Pros: Non-Atlas users also get benefit of seeing geographic information, albeit in text Cons: Potentially seen as annoying by non-atlas users, (There likey more)

Is this feasible? Would you do it another way if you had to do it? What approach would you take?

If you have DBs/Backend in mind: I have never done backend/db before so I kinda dread it, but would teach it to myself and try to implement it, if you lay me down some issues/milestones that I could orient on

Or not do the feature at all? (why?)

Will this granularity be utilized?

You're right, it's not used right now and a lot of regions are without comments. I'd leave it there to - if the atlas gets any resonance and usage at all - encourage postings on administrative levels, in order to harness the posting power™ for it to grow in usefulness over time. I see the benefit in being able to directly read about e.g. Xinjiang by clicking on it/without having to use the query field. Also its cool to browse through the map and learn about the geography.

Down the line I'd pass this idea by the mod/admin team first: To encourage region specific posting even more I was thinking of asking the community if they would like to see a mechanism to auto-tag "correspondent" users (users that are knowledgeable, at the scene, informative, etc. about a country/region) and if they do want to see this, then to together define rules on how to get the "correspondent" tag as a user e.g. user commented/posted about a region at least x amount of times and got at least x votecount on these, First x users sorted by top all of the selected region, nomination with lemmy bot, etc.
[The removal of downvotes on hexbear ensured that disapproval of a comment had to be done by "ratio" which encourages discussions and avoids just. A community defined ruleset on how to get a "correspondent" tag could encourage region specific discussions in a similar manner. Additionally the correspondent tag would carry representational value, which could introduce an interesting dynamic, but could also mean an increase in moderation]

I can see that associating comments with regions/countries is done by looking for names in the text

I'm building a really fancy search page for lemmy :D Can you tell me how the query field functions? I noticed it made a difference what the string is and the arrangement that I pass into q. Can you give me tips on how you would create a query?

I would like to keep adding features and build something very informational and useful for people who have a dialectical materialist outlook at the world.

Thank you!

SleeplessOne1917 commented 5 months ago

Regarding injecting HexAtlas info into posts/comments: that definitely seems pretty annoying.

If you have DBs/Backend in mind: I have never done backend/db before so I kinda dread it, but would teach it to myself and try to implement it, if you lay me down some issues/milestones that I could orient on

I think using a DB would help in avoiding the text-injection implementation. As for which DB to use: that depends on what would end up getting stored. You might be able to get away with something small like sqlite. Depending on how the data is modeled, it could be easier to use a document DB like mongo or cassandra. While I'm no DB expert, I have enough experience that I can be helpful.

Rewinding to the description of the user story:

User story: UserA selects by clicking regions on the map and setting selectedRegionsArray. Then names the selected regions. Writes comment and posts via Atlas. Later another UserB stumbles on the (highlighted) comment and can click on it. After clicking User B is presented with the region selection from UserA

This description mixes functionality from the user perspective and implementation details. I take it that you mean the user would have some way in the interface of selecting different regions (like each click toggling selected/deselcted or something) and that the code running it would use an array in the implementation?

I don't think I can offer any useful input on the idea about associating certain users with regions at the moment.

As for how the search endpoint works, I'll need to take a peek at Lemmy's backend source code and get back to you. My guess, though, is that it's using some search that's built into Postgres.

Finally, I have another idea for a feature: a toggle for selecting entire countries vs regions within countries. It could be radio buttons or something.

hexatlas commented 5 months ago

Regarding injecting HexAtlas info into posts/comments: that definitely seems pretty annoying.

Thank you for your perspective. Its a solution I thought of only, in order to avoid having to do DBs 😅

This description mixes functionality from the user perspective and implementation details. I take it that you mean the user would have some way in the interface of selecting different regions (like each click toggling selected/deselcted or something) and that the code running it would use an array in the implementation?

I don't have much experience communicating ideas to other developers apart from things I picked up from tutorials, but you got it exactly right! But now that DBs are on the table I think the user story can be different as well.

Depending on how the data is modeled

I will need to think more about this and will get back to you on this. Please also feel free to share if you happen to think of something.

As for how the search endpoint works, I'll need to take a peek at Lemmy's backend source code and get back to you. My guess, though, is that it's using some search that's built into Postgres.

Thank you for the hint, I will try to familiarize myself with this.

hexatlas commented 4 months ago

I wasn't able to come up with a good DB Model, but believe to have found a solution without needing one still and would like to bounce this idea off of you. Similarly like before, but perhaps at lot less annoying:

When the user selected the regions and names it (e.g. brics), selects and an image (flag?), it creates a post on lemmy, with a well structured and informative Post Title and Post Body.

Post  |  [ATLAS] Brics - 2024-03-21
Image |  Newsmega_enjoyer1337 to news - 25 - 1 hour ago 

// Well structured post body with a table with the composite of selected countries; Not something ugly as that JSON in the example above above

Now we'd be able to fetch all user defined regions that are trending (search by e.g. [ATLAS]) and are able to sort it, etc. Once you select a user defined region/post you are presented with the highlighted region on the map additionally to the comments from the post.

When you post a comment on the user defined region it makes a normal comment without any ugly JSON Metadata as suggested before. You'd comment under that specific Post/Thread.

It would be less annoying because you wouldn't be confronted with JSON spoiler atlas comments while browsing regularly all the time. You'd only stumble upon a trending [ATLAS] Post, and the user immeditaly knows from the well structured breakdown from the composite what countries are included. It could function similarly like the pinned Megas (just more dynamic an location specific)

I'm not sure If I'm giving across the idea properly 😅