0x5bfa / FluentHub

A stylish yet powerful GitHub client for Windows
MIT License
1.08k stars 52 forks source link

Implement search functionality #264

Closed arihant2math closed 1 year ago

arihant2math commented 1 year ago

⏱️ Before you start...

📄 Description

The search functionality in GitHub is probably going to be more used in fluent hub because people don't have google to search for projects on. I am implementing this with the Octokit.net API. I will adhere to the GitHub search UI unless otherwise requested.

🗃️ Alternative solutions

No response

📸 Assets

No response

0x5bfa commented 1 year ago

As you told, this feature is very important for FluentHub. So we need to discuss the matter about how we implement it.

arihant2math commented 1 year ago

@onein528 I am not so experienced with .NET design patterns, so ill need some help here, but the general idea is: AutoSuggestBox (on type) -> return default set of suggestions (based on page) SuggestionChosen or Submitted etc. -> navigate to a search page with a sidebar etc. (somehow communicating the searchbox value)

Search Page -> use octokit to query with the text (current option on sidebar (default repos)) -> display data

Components: Search.xaml and related files (ViewModel etc). SearchService.cs et. al. SearchModel of some sort

0x5bfa commented 1 year ago

Currently, the former one would be nice.

arihant2math commented 1 year ago

The former as in?

arihant2math commented 1 year ago

@onein528 I have a couple of questions:

arihant2math commented 1 year ago

I'm working on it: image

arihant2math commented 1 year ago

@onein528 I'll need icons for the stuff with notification icons on them.

0x5bfa commented 1 year ago

Ah, I'm not sure Octokit.NET has search APIs.

0x5bfa commented 1 year ago
  1. maybe json file with something service.
  2. shouldn't be NavigationView. I think it should just be button group.
  3. hmm. title? like 'search result on FluentHub/FluentHub repository'
arihant2math commented 1 year ago

It has some of them: https://octokitnet.readthedocs.io/en/latest/search/

0x5bfa commented 1 year ago

@onein528 I'll need icons for the stuff with notification icons on them.

You can get them from Assets/Icons/**

0x5bfa commented 1 year ago

It has some of them: https://octokitnet.readthedocs.io/en/latest/search/

wow really cool.

arihant2math commented 1 year ago

@onein528 I'll need icons for the stuff with notification icons on them.

You can get them from Assets/Icons/**

Some of them don't have icons in that folder. Check the mock-up for the stuff that I can't find icons for.

0x5bfa commented 1 year ago

Wiki

image

Code

image

Marketplace

image

Topic

image

0x5bfa commented 1 year ago

How about? @arihant2math

arihant2math commented 1 year ago

Icons lgtm, ill add them.

arihant2math commented 1 year ago

@onein528 How about the tab icon? It is currently the settings icon, but it needs to be changed.

Lamparter commented 1 year ago

@onein528 How about the tab icon? It is currently the settings icon, but it needs to be changed.

Changed to what @arihant2math?

0x5bfa commented 1 year ago

Find icon:

image

arihant2math commented 1 year ago

@onein528 I need one more icon for discussions. Thanks for the icons

Lamparter commented 1 year ago

@onein528 I need one more icon for discussions. Thanks for the icons

image

0x5bfa commented 1 year ago

the one that he showed @DeveloperWOW64 is already included in fluenthub. what do you mean more icons for discussion? id like to ask why do you need more icons than one for one meaning thing?

arihant2math commented 1 year ago

@onein528 My bad, I didn't realize that the icon was there.

arihant2math commented 1 year ago

@onein528 Due to all those complications I lost all the code that was on git, I still have the code on my local machine though, so I'll have to destroy my fork, create a new one, and the reupload it all.

0x5bfa commented 1 year ago

@arihant2math Maybe dont need. Can you open PR of this comparison https://github.com/FluentHub/FluentHub/compare/main...search? You have write access as outside collaborator (check GitHub notifications).

0x5bfa commented 1 year ago

@arihant2math I dont understand what are you doing. Why did you delete that branch and re-create?

arihant2math commented 1 year ago

image I saw only 3 commits on that branch, the bulk of the code was missing, since it was all deleted, now I am going through and carefully recreating the code.

0x5bfa commented 1 year ago

image

Your branch name is updated to search2. and re-invited you.

(I wanted you to continue with this branch. With that change, I had to request a new change in many ways, so I made a template by that 3 commits such as 'Views/Search' should be 'Views/Searches', 'Repo' must be 'Repository', Dont use Frame instead, use UserControl for NavView and so on)

arihant2math commented 1 year ago

The branch actually doesn't build because I messed up the .csproj file too much. I think I'll work on the normal branch because it seems you have moved the changes there.

Lamparter commented 1 year ago

The branch actually doesn't build because I messed up the .csproj file too much. I think I'll work on the normal branch because it seems you have moved the changes there.

'normal branch' wdym? @arihant2math

arihant2math commented 1 year ago

the default search branch

0x5bfa commented 1 year ago

@arihant2math Done first step. Can you open a PR with this branch?

Open a PR

image