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 ability to choose sort order #19

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Mrwebente
Copy link

@Mrwebente Mrwebente commented Sep 28, 2022

Add new sort by date ascending/descending capability

(contains fix for bug(s) as well)

* replace querySelector with getElementById because it can handle ids that start with numbers
* add functionality to sort by date asc or desc
@Mrwebente
Copy link
Author

Will fix merge conflicts tomorrow

@aplotor aplotor changed the title add new sort by date functionality add ability to choose sort order Sep 30, 2022
@aplotor
Copy link
Owner

aplotor commented Oct 1, 2022

ive added contributing guidelines to the repo. please read before continuing

<label class="btn btn-secondary shadow-none"><input type="radio" name="options"/>posts</label>
<label class="btn btn-secondary shadow-none"><input type="radio" name="options"/>comments</label>
<label class="btn btn-secondary shadow-none active"><input type="radio" name="options"/>all</label>
</div>
<div bind:this={sort_btn_group} class="btn_padded btn-group btn-group-toggle flex-wrap" data-toggle="buttons">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see youve added a btn group. i think it would be a better design to simply have a small toggle btn with visual indicator (e.g., unpressed for desc, pressed for asc) for this sort feature, rather than a whole new btn group, to avoid bloating up the ui

ideal position for it
image
(the btn should visually fit with that row. the size of the subreddit select should be decreased to make space for it, and there should be spacing between the subreddit select and the new btn, like the search bar and the subreddit select)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will try to implement this, might take a bit since I'm unfamiliar with svelte and JS

@@ -185,6 +185,12 @@ img {
list-style-type: none;
}

.btn_padded {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use inline bootstrap margin shorthand to adhere with the existing convention rather than creating a new css class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants