-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implement "New Report Type: Section Report" #12
Comments
@maeda-m Let me hear what you think. If you have any questions, please ask. 意見を聞かせてくだされ。もしわからんことがあれば聞いてください。 |
なお、議論をして一定の形にすることが目的なので、日本語など英語以外でのコメントも遠慮なくどうぞ。 |
下記記事で SectionReport で何ができるのかについて簡単に説明されています (in japanese)。 |
偉大な提案で、私にとって学びが多くありました。ありがとうございます。 以下、思ったことを挙げます。
以上です。 😄 |
@maeda-m
そうですね。複数選択だけでなく、editor の機能や仕様については、既存の editor を踏襲するのではなく、改めて取捨選択したいと思っています。
WebAssembly がどのようなものか詳しくありませんが、提案した editor でテキストの高さの計算方法を変更した最大の理由は、既存の算出方法(下記)では、OS やディスプレイ解像度など、利用環境によって算出したテキストの高さが異なることです。
その一つの解として、フォントサイズによるシンプルな計算方法を採用しました。
提案した editor は、私達のプロダクトで実際に使っていますが、現時点ではこの計算方法で問題は発生していません。もちろん、この高さは正確なものでなく、editor 上の高さと生成されたPDFの高さと一致しない可能性があることは認めますが、多くの場合そこまでの厳密さは必要ではないと考えています。 将来、WebAssembly など、editor 上でより厳密で環境に依存しない算出方法を見つけたら、それを採用することを試みても良いと考えています。 さて、
の提案についてはどう考えていますか?この提案に異論が無ければ、editor と generator の pullrequest を取り込み、開発を進めていきたいと思っています。 その開発の進め方については、提案に書いてある通りですが、取り込んだ上で、改めて別の issue で議論したいと思っています。 |
同意見です。
そうなのですね。自動収縮などの振舞いが前提となると、厳密さは必要ないのかもしれませんね。
はい。異論はありません。 |
@maeda-m |
Editor と Generator の上記 pull request をマージしました。どちらも CI がパスしていることは確認したので、この issue はクローズしますね。 なお、この後の開発の進め方などは、一旦 #7 のコメントで話しましょうか。 The Editor and Generator pull requests have been merged. Now that I've confirmed that they both pass CI, I'll close this issue. Let's talk about the next steps of development in the comments of #7. |
Summary
We have implemented the section-report format proposed at the Issue: New Report Type: SectionReport, and created pull requests for the generator and the editor respectively.
We are actually using this implementation in our products and would like to provide this to the Thinreports community.
However, our current implementation is incomplete and still have some issues to discuss. We would like to discuss how to solve those issues, how to proceed with the development, and work with the community towards the release of the section-report format.
Specification
The specifications of our section report implementation is based on the Issue: New Report Type: SectionReport.
Issues
However, the current implementation contains specifications that differ from the Issue: New Report Type: SectionReport, features that we added independently, and specifications that we have not been implemented. There are also some known issues. See the Implementation Status section of each pull request for details.
Examples
We have created some examples of the section-report format features as feature tests for the generator. Each example includes a description of the specifications, a Ruby code, a template file, and an output PDF file.
groups
parameteroverflow: expand
attributeNote
Our blog post about the section-report format may be helpful:
Getting Started
Installing
See the Getting Started section of each pull request.
Hello World
First, create a template.
detailed instructions for creating a template
Launch the editor applicaiton.
Delete the header and footer sections, which are unnecessary in this example.
Click the section region to select, and click 削除 (Delete) in the 編集 (Edit) menu.
Specify the properties of the detail section.
Click the detail section region. In the right property pane, input
hello_world
as the ID attribute. And enter100
as the 高さ (height) attribute.Put a text-block on the detail section.
Select the text-block tool (the red circle in the figure) in the toolbar. And drag and drop in the detail section to create a text-block at the region. You can leave the text-block properties as the default values.
The template is now complete.
This is a simple template which has a detail section whose ID is
hello_world
. The detail section includes a text-block whose ID istext
.Create a dirctory named
hello_world
in an arbitrary location, and save the template astemplate.tlf
in thehello_world
directory.Then, create
generate.rb
in thehello_world
directory, and write the following code:Execute this, and
hello.pdf
is generated in thehello_world
directory.hello.pdf:
Future Development
There are still some issues and unimplemented specifications left. But the section-report format is a huge specification and it would be difficult to complete this on our own. Not only are there insufficient development resources, but there is also a need for discussion to make the specifications optimal for Thinreports.
Based on our implementation, we would like to discuss and develop it gradually with the community.
Specifically, we propose the following development approach:
In order for many developers to participate, we need a foundation such as the specifications and the tasks. It may take some time to put it in place, but we think it is necessary for sustainable development.
It's also a good idea to create small tasks and use labels like good for first issue to make it easier for new developers to join, and use the GitHub Project to clarify the roadmap and development status.
The text was updated successfully, but these errors were encountered: