Skip to content

Meta: Move hotfixes to new repo + allow string hotfixes#5763

Merged
fregante merged 8 commits into
mainfrom
yolo
Jul 3, 2022
Merged

Meta: Move hotfixes to new repo + allow string hotfixes#5763
fregante merged 8 commits into
mainfrom
yolo

Conversation

@fregante
Copy link
Copy Markdown
Member

@fregante fregante commented Jul 2, 2022

@fregante fregante added the meta Related to Refined GitHub itself label Jul 2, 2022
@fregante fregante changed the title Meta: Move hotfixes to new repo Meta: Move hotfixes to new repo + allow dynamic updates of certain strings Jul 2, 2022
@fregante fregante marked this pull request as ready for review July 2, 2022 07:35
Comment thread source/features/index.tsx
select('#js-repo-pjax-container, #js-pjax-container')?.append(<has-rgh/>);
select('#repo-content-pjax-container, turbo-frame')?.append(<has-rgh-inner/>); // #4567
select(_`#js-repo-pjax-container, #js-pjax-container`)?.append(<has-rgh/>);
select(_`#repo-content-pjax-container, turbo-frame`)?.append(<has-rgh-inner/>); // #4567
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is likely to change soon, so it's the first target for dynamic replacement

Comment thread source/features/index.tsx Outdated
getLocalStrings(),
]);

console.log({value: _`Original`});
Copy link
Copy Markdown
Member Author

@fregante fregante Jul 2, 2022

Choose a reason for hiding this comment

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

Line 98 and line 108 show the regular string and then the string after the replacement

Screen Shot 1

thanks to

https://github.com/refined-github/yolo/blob/0edd58aed757c51062a235715c8a0d7037731da0/strings.json#L2

Comment thread source/helpers/hotfix.ts
return '';
}

export type HotfixStorage = Array<[FeatureID, string]>;
Copy link
Copy Markdown
Member Author

@fregante fregante Jul 2, 2022

Choose a reason for hiding this comment

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

I think eventually we should have a single updater function and a single hotfixes object in the options, like:

{
  style: 'body {color: red}',
  broken: ['forked-to'],
  strings: {from: 'to'},
}

Comment thread source/helpers/hotfix.ts

const storage: HotfixStorage = [];
for (const [featureID, unaffectedVersion, relatedIssue] of parseCsv(atob(content))) {
for (const [featureID, relatedIssue, unaffectedVersion] of parseCsv(content)) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This comment was marked as spam.

@fregante fregante changed the title Meta: Move hotfixes to new repo + allow dynamic updates of certain strings Meta: Move hotfixes to new repo + allow string hotfixes Jul 3, 2022
@fregante fregante merged commit 9352caf into main Jul 3, 2022
@fregante fregante deleted the yolo branch July 3, 2022 12:02
jpe-io

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

3 participants