Skip to content

Add pinned-issues-update-time feature - #2795

Merged
fregante merged 23 commits into
refined-github:masterfrom
yakov116:updated-pinned
Mar 3, 2020
Merged

fregante merged 23 commits into
refined-github:masterfrom
yakov116:updated-pinned

Conversation

@yakov116

@yakov116 yakov116 commented Feb 17, 2020 •

Copy link
Copy Markdown
Member

Closes #2747

@fregante I tried my best :) it works.

Typescript made me do funny things lol

image

Comment thread source/content.ts Resolved
@yakov116

yakov116 commented Feb 17, 2020 •

Copy link
Copy Markdown
Member Author

@fregante can you update xo (to 26) on the master branch?

I will update the PR later tonight

Side note to you use VScode? How do you get xo formatter to work with typescript?

@fregante

Copy link
Copy Markdown
Member

Side note to you use VScode? How do you get xo formatter to work with typescript?

Sadly AKAIK it's not compatible yet, so xo errors just don't appear in TS files. I just run xo --fix from the console.

@yakov116
yakov116 requested a review from fregante February 18, 2020 04:20

@fregante fregante left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Almost there! 🎉

Make sure the next iteration passes lint (run xo --fix)

Also this #2795 (comment)

@fregante fregante changed the title Updated pinned Add pinned-issues-update-time feature Feb 18, 2020
@yakov116

yakov116 commented Feb 18, 2020 •

Copy link
Copy Markdown
Member Author

Almost there!

Make sure the next iteration passes lint (run xo --fix)

When I run xo it changes 136 files, All the imports get moved around.
Can it be since my global xo it on 26?

@fregante

fregante commented Feb 18, 2020 •

Copy link
Copy Markdown
Member

Are you using yarn to install packages? Because npm should follow the package-lock file and xo uses the local version, 0.25.

If xo is giving you errors for 0.26 that's the version you have in the local node_modules. The global version is irrelevant if you have a local one installed.

@yakov116

yakov116 commented Feb 18, 2020 •

Copy link
Copy Markdown
Member Author

let me try to do npm install

Did not help...

@yakov116

Copy link
Copy Markdown
Member Author

Maybe because I have es-plugin-unicorn installed globally?! Not sure. whatever...

@fregante

fregante commented Feb 18, 2020 •

Copy link
Copy Markdown
Member

Maybe because I have es-plugin-unicorn installed globally?! Not sure. whatever...

npm install doesn't clean node_modules; you'd have to delete the folder and do a clean install.

But for now: #2802

@yakov116

Copy link
Copy Markdown
Member Author

@fregante I have to go to sleep.

I tried very hard (I never worked with multiple graphql requests)
I was unable to get a screenshot yet (hopefully tomorrow morning)
I also was unable to get the cache.function( to work.

Let me know what else i can improve

😴

A function named `getLastUpdated` should not receive a random query chunk. It should use it directly (or have it inlined) and be self-sufficient

`getPinnedIssueNumber` and `select.all('.pinned-issue-item')` were specified in two places.
@fregante
fregante marked this pull request as ready for review February 19, 2020 12:50
@fregante

Copy link
Copy Markdown
Member

Thank you! I made some changes to clean it up.

@yakov116

Copy link
Copy Markdown
Member Author

@fregante thank you!!

I learned a lot from this. Anything I need to do? Screenshot?

I may not be able to do that until later tonight.

@fregante

fregante commented Feb 19, 2020 •

Copy link
Copy Markdown
Member

Yeah, a screenshot is missing. Try taking it at @2x adding a simple arrow pointing to the new time.

Before that though, the icon needs to be aligned. Look at the classes that the Closed issue uses to align it correctly.
Screen Shot 2020-02-19 at 20 39 05

@yakov116

yakov116 commented Feb 19, 2020 •

Copy link
Copy Markdown
Member Author

Before that though, the icon needs to be aligned. Look at the classes that the Closed issue uses to align it correctly.

Tried nothing that I was able to figure out.

Look like even github does not align it correctly

@yakov116

Copy link
Copy Markdown
Member Author

@fregante I tried aligning it again. Going to need help

@fregante

Copy link
Copy Markdown
Member

It's not working because the markup doesn't match the "[icon] closed" one. You're using an extra .issue-meta-section span that doesn't belong there.

@yakov116

Copy link
Copy Markdown
Member Author

if I take that off it loses the gray color.
image
Should I add it back?

@fregante

Copy link
Copy Markdown
Member

You can wrap the icon alone, or if that messes up the alignment you can color it via CSS (last resort)

@yakov116

Copy link
Copy Markdown
Member Author

@fregante the class has an align bottom to it. I would make a new class or add style to the div directly?

@yakov116

Copy link
Copy Markdown
Member Author

I tried to add a class but as soon as I uncomment the import the whole extension crashes

@fregante
fregante merged commit 206a1a3 into refined-github:master Mar 3, 2020
@yakov116
yakov116 deleted the updated-pinned branch March 15, 2020 03:30
@fregante fregante mentioned this pull request Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

See "Last updated" date on Pinned issues

2 participants