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

Focusing: focus/blur #160

Merged
merged 11 commits into from Nov 16, 2020
Merged

Focusing: focus/blur #160

merged 11 commits into from Nov 16, 2020

Conversation

@Pazmy
Copy link
Contributor

@Pazmy Pazmy commented Oct 24, 2020

No description provided.

Pazmy added 6 commits Oct 20, 2020
@javascript-translate-bot javascript-translate-bot requested a review from javascript-tutorial/translate-id Oct 24, 2020
@javascript-translate-bot javascript-translate-bot mentioned this pull request Oct 24, 2020
84 of 174 tasks complete
Copy link
Contributor

@juuni26 juuni26 left a comment

tolong diperbaiki beberapa bahasanya gan. terimakasih telah membantu projek open source ini berkembang 👋

3. Focus on the textarea.
4. Show buttons OK/CANCEL under the cell, handle clicks on them.
1. Saat diklik -- ganti `innerHTML` dari sel oleh `<textarea>`dengan ukuran yang sama dan tanpa border. Bisa menggunakan JavaScript atau CSS untuk mengatur ukuran yang sesuai.
2. Set `textarea.value` ke `td.innerHTML`.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

Set belum diterjemahin, bisa diubah jadi atur atau ubah

2. Set `textarea.value` to `td.innerHTML`.
3. Focus on the textarea.
4. Show buttons OK/CANCEL under the cell, handle clicks on them.
1. Saat diklik -- ganti `innerHTML` dari sel oleh `<textarea>`dengan ukuran yang sama dan tanpa border. Bisa menggunakan JavaScript atau CSS untuk mengatur ukuran yang sesuai.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

sepertinya lebih baik kata "oleh" nya dihilangkan, agar mempermudah pembacaan dan jangan lupa spasi setelah <textarea>

- Only one cell may be editable at a moment. While a `<td>` is in "edit mode", clicks on other cells are ignored.
- The table may have many cells. Use event delegation.
- Saat diklik -- sel akan menjadi "editable" (textarea muncul dalam), kita bisa mengubah HTML. Tidak boleh mengubah ukurannya, semua geometri harus tetap sama..
- Tombol OK and CANCEL muncul di bawah sel untuk finish/cancel editing.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

kata finish/cancel bisa diterjemahkan lagi , contoh kalimat: "tombol ok dan cancel muncul dibawah sel untuk menyelesaikan atau membatalkan proses sunting/perubahan."

- The table may have many cells. Use event delegation.
- Saat diklik -- sel akan menjadi "editable" (textarea muncul dalam), kita bisa mengubah HTML. Tidak boleh mengubah ukurannya, semua geometri harus tetap sama..
- Tombol OK and CANCEL muncul di bawah sel untuk finish/cancel editing.
- Hanya satu sel yang dapat diedit setiap saat. Sementara `<td>` dalam "edit mode", klik pada sel lain akan diabaikan.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

saran tambahkan imbuhan "nya "agar menekankan di satu moment . "Hanya satu sel yang dapat diedit setiap saatnya"

@@ -1,6 +1,6 @@

We can use `mouse.onclick` to handle the click and make the mouse "moveable" with `position:fixed`, then `mouse.onkeydown` to handle arrow keys.
Kita bisa gunakan `mouse.onclick` untuk menghandle klik dan membuat mouse "moveable/bergerak" dengan `position:fixed`, kemudian `mouse.onkeydown` untuk handle tombol panah.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

menghandle bisa diubah menjadi menangani/mengatur


The only pitfall is that `keydown` only triggers on elements with focus. So we need to add `tabindex` to the element. As we're forbidden to change HTML, we can use `mouse.tabIndex` property for that.
Satu-satunya jebakan ialah `keydown` hanya trigger pada elemen dengan fokus. Jadi kita perlu untuk menambahkan `tabindex` pada elemen. Karena kita dilarang mengubah HTML, kita bisa gunakan `mouse.tabIndex` properti untuk itu.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

trigger bisa diubah menjadi memicu, contoh: keydown hanya memicu pada elemen yang memiliki fokus. dan properti bisa diletakkan didepan agar sesuai dengan kaidah bahasa , contoh : kita bisa gunakan propertimouse.tabIndex untuk itu.


[demo src="solution"]

P.S. Don't put event handlers anywhere except the `#mouse` element.
P.P.S. Don't modify HTML/CSS, the approach should be generic and work with any element.
P.S. Jangan letakkan event handler dimanapun kecuali elemen `#mouse`.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

tambahkan kata "pada" agar lebih menjelaskan dimana elemen mouse. contoh: "Jangan letakkan event handler dimanapun kecuali pada elemen #mouse."

P.S. Don't put event handlers anywhere except the `#mouse` element.
P.P.S. Don't modify HTML/CSS, the approach should be generic and work with any element.
P.S. Jangan letakkan event handler dimanapun kecuali elemen `#mouse`.
P.P.S. Jangan modif HTML/CSS, pendekatannya harus umum dan bekerja dengan elemen manapun.

This comment has been minimized.

@juuni26

juuni26 Nov 6, 2020
Contributor

modif bisa diubah menjadi kata yang lebih baku seperti ubah atau modifikasi sekalian.

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

Pazmy added 5 commits Nov 12, 2020
@Pazmy
Copy link
Contributor Author

@Pazmy Pazmy commented Nov 12, 2020

/done

@juuni26 juuni26 merged commit 37e138e into javascript-tutorial:master Nov 16, 2020
1 check passed
1 check passed
license/cla Contributor License Agreement is signed.
Details
@javascript-translate-bot

Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.
HTTPS · web.archive.org
← Home