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

Fix usage of `|+align=...` in `format=table` #1357

Merged
merged 1 commit into from Jan 8, 2016

Conversation

Projects
None yet
2 participants
@mwjames
Copy link
Contributor

mwjames commented Jan 8, 2016

{{#ask: [[Currency::+]]
 |?Currency|+align=right|+limit=2
 |format=table
}}

https://phabricator.wikimedia.org/T18571

Fix usage of `|+align=...` in `format=table`
```
{{#ask: [[Currency::+]]
 |?Currency|+align=right|+limit=2
}}
```

@mwjames mwjames added the bug label Jan 8, 2016

@mwjames mwjames added this to the SMW 2.4 milestone Jan 8, 2016

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Jan 8, 2016

@kghbln It seems no one really missed this feature |+align=right otherwise someone would have complained. At least now it is tested.

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Jan 8, 2016

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Jan 8, 2016

@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented Jan 8, 2016

|+align=right per ?-row

Indeed, so far we only seem to have had a global |align=right as in

...
|?...
|format=table
|align=right
...

So this is not just a bug fix but also an enhancement?!

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Jan 8, 2016

So this is not just a bug fix but also an enhancement?!

According to [0] NO, it states "This has now been implemented: additional parameters to individual ?printouts can be given by writing "|+ parameter=value" after the printout. Currently, there are parameters for limiting and ordering results ("limit=number" and "order=ascending/descending"), and special parameters for some printouts (e.g. format=table supports "align=right" and "align=center").

The bug remains open since these parameters do not work properly with Special:Ask yet: they are simply lost when clicking on "further results"."

Of course, the "...do not work properly with Special:Ask yet: they are simply lost when clicking on "further results"" remains valid but that's for a follow-up.

[0] https://phabricator.wikimedia.org/T18571

@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented Jan 8, 2016

According to [0] NO

Ah, true so the docu of this on smw.o was messed up from the start since it states it should be used globally for a query. I guess this has not been used wide spread since it is pretty useless. However, now there is more light on this. Cool this makes sense.

Since this is only format specific for table and broadtable it should probably appear in #smwdoc for these two?

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Jan 8, 2016

Since this is only format specific for table and broadtable it should probably appear in #smwdoc for these two?

#smwdoc deals with enabled parameters while |+align= (or in case of the record type |+index=) are printout specific parameters and not bound to an "official" parameter declaration.

@kghbln

This comment has been minimized.

Copy link
Member

kghbln commented Jan 8, 2016

#smwdoc deals with enabled parameters

Yeah, still a bit edgy. However, it makes sense not to do exceptions.

@mwjames

This comment has been minimized.

Copy link
Contributor Author

mwjames commented Jan 8, 2016

Of course, the "...do not work properly with Special:Ask yet: they are simply lost when clicking on "further results"" remains valid but that's for a follow-up.

Just as a side note, trying to use something like ?Has number|+align=right|+limit=2|+order=asc in the Special:Ask printout text area will fail because of the | usage.

mwjames added a commit that referenced this pull request Jan 8, 2016

Merge pull request #1357 from SemanticMediaWiki/bug
Fix usage of `|+align=...` in `format=table`

@mwjames mwjames merged commit c9fe172 into master Jan 8, 2016

3 checks passed

Scrutinizer No new issues
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mwjames mwjames deleted the bug branch Jan 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.