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

#220 Shanghai Metro Style Station Number #291

Closed
wants to merge 19 commits into from
Closed

#220 Shanghai Metro Style Station Number #291

wants to merge 19 commits into from

Conversation

tkp30
Copy link

@tkp30 tkp30 commented Mar 21, 2022

#220 Part 1 (#231) and part 2 merge in one pull request.

@thekingofcity
Copy link
Member

Hi, you need to resolve conflicts before any review.

@tkp30
Copy link
Author

tkp30 commented Mar 21, 2022

Hi, you need to resolve conflicts before any review.

Fixed in d458129.

@tkp30
Copy link
Author

tkp30 commented Mar 21, 2022

Besides, the i18n of this pull request was not fixed right now. Please check other things without this.

@thekingofcity
Copy link
Member

Besides, the i18n of this pull request was not fixed right now. Please check other things without this.

No problem. I'll focus on the implementation instead of text. CI checks and builds are triggered for you. 😃

@tkp30
Copy link
Author

tkp30 commented Mar 21, 2022

Thinks tests are something wrong. I have prettier the code yet. Because of the VSCode crashed so it breaks the prettier in the shell in workspace? Emmm, I will fix it sometimes then.

@tkp30
Copy link
Author

tkp30 commented Mar 22, 2022

OK! Lint fixed in 985254c. I think it can merge.

@thekingofcity
Copy link
Member

I'll do a review in the following days. Hope that won't take long.

@wongchito
Copy link
Member

Merged lasted master and fix indentation

@tkp30
Copy link
Author

tkp30 commented Mar 28, 2022

Thanks to help me fix format.@wongchito

Copy link
Member

@thekingofcity thekingofcity left a comment

Choose a reason for hiding this comment

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

Sorry for the late review, I was busy these days.

Everything looks fine except the vague line number UI and two show station number switches.

Also, Line 10 template should be updated with station numbers.

@@ -4,6 +4,10 @@
.rmg-name__en {
font-family: Arial, sans-serif;
}
.rmg-station-name {
Copy link
Member

Choose a reason for hiding this comment

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

As we said before, no need for another class style, .rmg-name__en would be fine for numbers.

/**
* Display the station number in railmap or not.
*/
showStationNumberRailmap: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Do we really need to distinguish between two scenarios? For stations that only display station number at runin canvas, I believe that is just an obsolete image at will be replaced soon.

Copy link
Author

Choose a reason for hiding this comment

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

Like the resolve of Disney Icon. There're some person reason in it (For my Minecraft server), sorry.

Copy link
Member

Choose a reason for hiding this comment

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

If you need the station number on only one canvas, why not download one canvas and switch the station number button and then download another canvas?

Copy link
Author

Choose a reason for hiding this comment

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

Because now numbers in railmap were replaced, but at Xinjiangwancheng - Hangzhong Road/Hongqiao Railway Station the station numbers on runin also there.(Xinjiangwancheng removed.)

</ListItemSecondaryAction>
</ListItem>
<ListItem>
<TextField
Copy link
Member

Choose a reason for hiding this comment

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

Will you put a label before the line num? Just like what GTMTR did https://github.com/wongchito/RailMapGenerator/blob/rmg-3.12.3/src/panels/design/list-gzmtr.tsx#L63

Copy link
Author

Choose a reason for hiding this comment

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

....I forget to do it because there are only one field in part 1.

<ListItemText primary={t('design.panelType.button')} />
<Select native value={panelType} onChange={handleChange} style={{ width: 166 }}>
{Object.values(PanelTypeShmetro).map(type => (
<option key={type} value={type}>
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested default info_panel_type sh? It looks a bit weird on my browser.
image

Copy link
Author

Choose a reason for hiding this comment

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

Oh! Sorry my test template is using sh2020.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just find a problem: Shanghai Line 10 removed all station number on railmap in the 2012 style (which is the current style (without platform number version) that RMG uses) update although the station number still remain on Running-in):
Screen Shot 2022-05-23 at 4 26 41 PM

Which now looks like this (the 2020 style also used the normal railmap without station number) (source: https://zhuanlan.zhihu.com/p/57368457)
v2-2051eed404e47fd73ca2d14b0dadc1f8_720w

Copy link
Member

Choose a reason for hiding this comment

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

@52PD Yes, this is the reason why station number in shmetro has a lower priority. And since this PR is targeted for V3, we may need a rewrite for this part.

Copy link
Author

Choose a reason for hiding this comment

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

I am going to rewrite it for v5. Thinks that we can make stationNumberRailmap option hidden and we only can edit it in json.

Copy link
Member

Choose a reason for hiding this comment

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

I'm still insisting that stationNumberRailmap is not needed. Users can hide the station number if showStationNumber is set. They can download one canvas, switch the control, and download another canvas.

<circle cx={xpos} cy={ypos} r="45" stroke="var(--rmg-grey)" strokeWidth="10" fill="white"></circle>
<line x1={xpos - 40} y1={ypos} x2={xpos + 40} y2={ypos} stroke="rgb(0,0,0)" strokeWidth="2" />
<StationNumberText
transform={'translate(' + xpos.toString() + ',' + (ypos - 5).toString() + ')'}
Copy link
Member

Choose a reason for hiding this comment

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

I'd say transform={`translate(${xpos},${ypos - 5})`} is enough. Using this will shrink this line a lot.

) => {
const { xpos, ypos, lineName, stationNumber, type_, ...others } = props;
switch (type_) {
case 3: //Line end
Copy link
Member

Choose a reason for hiding this comment

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

Line end looks super weird on my browser. Will you double-check it?

image

Copy link
Author

Choose a reason for hiding this comment

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

It's ok before.....Let me review.

type_: number;
} & React.SVGProps<SVGGElement>
) => {
const { xpos, ypos, lineName, stationNumber, type_, ...others } = props;
Copy link
Member

Choose a reason for hiding this comment

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

No ...others is needed, isn't it?

@Swiftiecott Swiftiecott mentioned this pull request May 23, 2022
@tkp30 tkp30 closed this by deleting the head repository Sep 22, 2024
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.

4 participants